You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Page shows error: "InvalidCharacterError: Failed to execute 'createElement' on 'Document': The tag name provided ('/static/media/index.73a4b08a.mjs') is not a valid name."
Reproducible Demo
See repro instructions above
I believe this is happening because webpack has been configured to treat files with filenames ending in .mjs as static files, so when you import one instead of returning a reference to the export, it will output the contents in static/media and return the path to that file as a string.
I'm still seeing an issue with destructuring .mjs imports ala import { something } from 'my-mjs-module' where something will be undefined... anyone else?
Note that when I switch the extension from .mjs to .js all is fine!
Activity
Timer commentedon Oct 4, 2017
Considering Node landed
.mjssupport in nodejs/node#14369, I'm open to supporting this file format.I welcome a PR to add support for the extension. 😄
Timer commentedon Oct 4, 2017
Note, even though the specification states:
I'd like to fallback last to
.mjsfor compatibility reasons until v2.0.0 so there's no breaking change.icd2k3 commentedon Dec 30, 2017
I'm still seeing an issue with destructuring
.mjsimports alaimport { something } from 'my-mjs-module'wheresomethingwill be undefined... anyone else?Note that when I switch the extension from
.mjsto.jsall is fine!