In the file script.js there are features of ES6 like import. For this, I connect script.js as a module, without the type = 'module' the browser generates an error. But when I connect the script
<script type = "module" src = "script.js"> </ script>
as a module, in the Chrome browser (v67), the console pops up an error:
Access to Script at 'file: /// D: /PROJECT/playing_field/src/script.js' from origin 'null' has been blocked by CORS policy: Invalid response. Origin 'null' is therefore not allowed access.
how to connect a script as a module?