- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 27.1k
Closed
Labels
Milestone
Description
Is this a bug report?
Yes?
Can you also reproduce the problem with npm 4.x?
Yes
Which terms did you search for in User Guide?
mjs, extension, static, media
Environment
- node -v: v6.2.2
- npm -v:3.10.10
- yarn --version(if you use Yarn):
- npm ls react-scripts(if you haven’t ejected):
[email protected] /Users/joe_lencioni/waypoint-test
└── [email protected]
Then, specify:
- Operating system: macOS Sierra
- Browser and version (if relevant): Chrome
Steps to Reproduce
(Write your steps here:)
- Clone https://github.com/colloquet/waypoint-test.git
- npm install
- npm start
Expected Behavior
Page loads without errors.
Actual Behavior
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.
Originally reported: civiccc/react-waypoint#221
