I'm building an application with Webpack and Babel. When the application runs into an error, it correctly lists the line number for the first error but then shows the line number for the minified code for each subsequent step.
My Webpack config is as follows,
const webpack = require('webpack');
const path = require('path');
module.exports = {
module: {
loaders: [
{
loader: "babel-loader",
exclude: [
/(node_modules)/,
],
query: {
presets: ['es2015','react'],
plugins: ['transform-object-rest-spread']
}
},
{
test:/\.less$/,
exclude:'/node_modules',
loader:"style!css!less"
}
]
},
entry: {
"index": ["./src/main"]
},
output: {
path: path.resolve(__dirname, "public"),
publicPath: "/assets",
filename: "[name].bundle.js"
},
resolve: {
extensions: ['', '.js', '.jsx'],
},
devServer: { inline: true },
devtool: 'source-map'
};