Closed jacquesn closed 5 years ago
After further diagnosis, I believe the problem was a namespace collision in brunch with "js/components". Changing the name of the folder fixed the problem.
Conclusion: don't make a folder under js/ called "components".
An error of "Could not load module" is thrown when my app.js file tries to import from files in subdirectories of assets/js/. The full line of the error:
The offending line of code is
import Something from "./components/Something"
.I'm using brunch, and the error is thrown during
brunch build --production
.If I only import from files in the same directory as app.js and comment out imports from subdirectories, the brunch build works fine.