Building LightingJS app for Samsung TV

Hi everyone, my app works perfectly on http://localhost:5173 after running npm start. However, I need it to work locally on a Samsung TV. This means the app needs to run as static files, but I’m encountering issues with CORS in Google Chrome and other browsers.
I built the app using npm run build, which generated static assets, but when I try to open the app in the browser, I encounter the following error:
index.html:1 Access to script at ‘…/dist/index.js’ from origin ‘null’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: chrome, chrome-extension, chrome-untrusted, data, http, https, isolated-app.

How can I configure the app to run correctly as static files for this use case? Do I need to adjust vite.config.js or use a specific setup to avoid this CORS issue? Any guidance would be greatly appreciated!

Hey @martino777 . What you are doing is correct, but I’m a bit surprised you’re getting CORS errors, regardless.

You should be able to solve this by adding the correct parameters on your config.xml file. I believe the one that will allow you to access everything is the following:

<access origin="*" subdomains="true"/>

Try adding it and see how it goes!