Here’s a piece of JS that was emitted by webpack:
/* WEBPACK VAR INJECTION */(function(global) {module.exports = global["MobileRouter"] = __webpack_require__(/*! -!/Users/mikolajdadela/code/lb-react-frontend/~/babel-loader?{"plugins":["transform-react-jsx"],"ignore":["node_modules/**/*"]}!./mobilePages/MobileRouter.jsx */ 1);
A shortened version so you can see what happened:
... __webpack_require__(/* ... ["node_modules/**/*"] ... */ 1);
^
When I run this code in browser, I get
Uncaught SyntaxError: Unexpected token *
@bebraw Minimal test case:
webpack.config.js
main.js
steps to reproduce
bundle.js (after the initial webpack stuff)
Note the syntax error in chunk
0
‘smodule.exports
line because the query string prematurely closes the comment. Also note that this construct is correctly escaped in the header comment for chunk1
as./main.js?*_/
Sorry for all the notifications. I’ve created PRs #2915 and #2916 to fix both problems.