I'm trying to play ES6 features in the latest release version of chrome, that is chrome 61, and I met the error during using the import
key word.
Technically, import
is used as following method but the console showed me errors:
import Mymodule from "Mymodule.js"
the console printed:
Uncaught SyntaxError: Unexpected identifier
I have already turn the following experimental features on:
chrome://flags/#enable-javascript-harmony
chrome://flags/#enable-module-scripts
and following off:
chrome://flags/#disable-javascript-harmony-shipping
The problem is that from "Mymodule.js"
.
A module must be either a full URL (including a protocol), an absolute path (starting with /), or a relative path (starting with ./ or ../).
Any other strings are reserved for future use.
source: https://jakearchibald.com/2017/es-modules-in-browsers/#bare-import-specifiers-arent-currently-supported (referenced from https://developers.google.com/web/updates/2017/09/nic61#modules )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With