#Cannot open vite project from files url

1 messages · Page 1 of 1 (latest)

desert locust
#

I need to open my vite project from my local disk without additional server from path like
file:///Users/vladimirsemenov/qameta/allure3/allure-report/index.html
but i get this error
Error: Access to Script at 'file://:*******/es6/code.js' from origin 'null' has been blocked by CORS policy: Invalid response. Origin 'null' is therefore not allowed access.

it's because chrome don't support <script type="module"> in file:// urls
https://stackoverflow.com/questions/46992463/es6-module-support-in-chrome-62-chrome-canary-64-does-not-work-locally-cors-er?rq=1

Can i somehow build app without type="module" ??

bronze fox
#

I have this same issue although I see this problem is old and nobody has answered