Answer the question
In order to leave comments, you need to log in
Why can't babel work when webpack builds?
Why can't babel work when webpack builds?
The babel
IE10 setup continues to swear at const, scattered throughout the js file.
module.exports = {
module: {
rules: [
{
test: /\.js$/,
exclude: [/node_modules/],
//use: 'babel-loader',
use: [{
loader: 'babel-loader',
options: {
presets: [
['env', {
'uglify': true,
"targets": {
"browsers": [
"ie >= 9"
]
},
}],
//['es2015', {
// "uglify": true,
//}],
]
}
}]
}
]
}
};
Answer the question
In order to leave comments, you need to log in
Look at the readme of the babel loader, env and exclude are transferred differently there
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question