-
-
Notifications
You must be signed in to change notification settings - Fork 452
How to handle npm modules which include es6 #171
Copy link
Copy link
Closed
Description
This is my babel-loader import in my webpack.config.js file
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['react', 'es2015']
}
}
],
I try to run this to make minified code with webpack -p --config webpack.config.js
It works fine unless I have the module qs.js included, which uses the keyword let throughout.
The authors of qs.js recommend transpiling qs using babel ljharb/qs#141.
I achieved this in the compilation step by removing exclude: /node_modules/but I think thats messy as it babelify's every module included in my application.
Is there a more elegant way to do this, without needed to manage my own version of qs.js
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels