Critical Bug: wix app dev fails to inject WIX_PUBLIC_URL into Custom Element module import paths (Mixed Content Error)

The Problem Statement

I am unable to develop using the Wix CLI because the generated custom element JavaScript file hardcodes http://localhost:5173 for internal module imports, resulting in a Mixed Content Block in the Wix Studio Editor (which is HTTPS).

Error in Editor Console: Access to script at 'http://localhost:5173/...' from origin 'https://static.parastorage.com' has been blocked by CORS policy... GET http://localhost:5173/... net::ERR_FAILED

i’m using wix cli version 1.1.131

Just to clarify, are you building a headless app with a Custom Element Site Widget using the Wix CLI?

1 Like

No i’m building a custom widget app with app dashboard and backend module

1 Like