Webpack显示错误的代码行,其中有一个错误

时间:2018-12-03 11:43:43

标签: webpack

当我在代码中遇到错误时,在Webpack浏览器中显示错误的行, 为什么会发生? 48 line shows webpack, 46 is correct.

webpackconfig:

const path = require('path');
const LiveReloadPlugin = require('webpack-livereload-plugin');

module.exports = {
  watch: true,
  mode: 'development',
  entry: {
    main: ['./js/main.js'],
  },
  output: {
    filename: 'main.js',
    path: path.resolve(__dirname, 'build')
  },
  plugins: [
    new LiveReloadPlugin()
  ]
};

0 个答案:

没有答案