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
I keep getting a runtime exception when trying to load a minified bundle that uses babel-polyfill and lodash. I extracted the failed code, and created a simple example of the error.
My package.json contains the following dependencies "babel-core": "^6.24.0", "babel-loader": "^6.4.1", "babel-polyfill": "^6.23.0", "babel-preset-env": "^1.4.0", "babili-webpack-plugin": "^0.0.11", "webpack": "^2.4.1",
The code creates 'use strict'; I(114); var Y = /[a-c\xdf-\xf6]+(?=[A-C\xc0-\xd6])/g, H = '[a-z\\\\xdf-\\\\xf6]+(?=' + ['[A-Z\\xc0-\\xd6]'].join('|') + ')', W = RegExp(H, 'g'); console.log('success');
(After running prettier on the main.bundle.js file)
from the main.js. You can see that the H variable has some extra escape characters, which cause the RegExp constructor to fail.
If I uncomment the evaluate: falseor comment the library: 'main' line from webpack.config.js or comment the import 'babel-polyfill'; from main.js, the resulting main.bundle.js file contains a properly escaped string, and the RegExp constructor passes.
The text was updated successfully, but these errors were encountered:
Hey @ATGardner! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.
I keep getting a runtime exception when trying to load a minified bundle that uses babel-polyfill and lodash. I extracted the failed code, and created a simple example of the error.
My package.json contains the following dependencies
"babel-core": "^6.24.0", "babel-loader": "^6.4.1", "babel-polyfill": "^6.23.0", "babel-preset-env": "^1.4.0", "babili-webpack-plugin": "^0.0.11", "webpack": "^2.4.1",
The code creates
'use strict'; I(114); var Y = /[a-c\xdf-\xf6]+(?=[A-C\xc0-\xd6])/g, H = '[a-z\\\\xdf-\\\\xf6]+(?=' + ['[A-Z\\xc0-\\xd6]'].join('|') + ')', W = RegExp(H, 'g'); console.log('success');
(After running prettier on the main.bundle.js file)
from the main.js. You can see that the H variable has some extra escape characters, which cause the RegExp constructor to fail.
If I uncomment the
evaluate: false
or comment thelibrary: 'main'
line from webpack.config.js or comment theimport 'babel-polyfill';
from main.js, the resulting main.bundle.js file contains a properly escaped string, and the RegExp constructor passes.The text was updated successfully, but these errors were encountered: