W
W
Waldemar10102020-04-28 19:58:30
JavaScript
Waldemar1010, 2020-04-28 19:58:30

Why does it show CORS error when importing a module in Javascript?

5ea86067beb17791590697.png
5ea86070d8d04117155208.png
5ea86071d1061439958315.png
5ea860ab7c68c215044285.png
5ea860fb63bdb025895195.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor, 2020-04-28
@Waldemar1010

SagePtr @SagePtr
Because file:// is quite strict, it would be wrong if the running file could easily rummage through the user's file system

try loading this module first
<script type="module" src="store.js"></script>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question