Answer the question
In order to leave comments, you need to log in
Why is babel-loader not working?
bundle.js is successfully created, but Babel's loader doesn't work for some reason. Here is the webpack config
module.exports = {
entry: './src/index.js',
output: {
path: __dirname + '/src',
filename: 'build.js'
},
watch: true,
module: {
loaders:[{
test: /\.js$/,
loader: 'babel-loader'
}]
}
};
Answer the question
In order to leave comments, you need to log in
loaders: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: [/node_modules/],
query: {
presets: ['es2015', 'react']
}
}
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question