Webpack没有将新文件编译成bundle

时间:2015-04-09 11:29:55

标签: webpack

我正在运行webpack-dev-server并且它一直在提供旧文件,任何想法?新捆绑包仍然包含旧文件。

当我运行webpack时,它会将新文件编译成新的包

配置:

module.exports = {
  context: __dirname + "/app",
  entry: "./main.js",
  output: {
    path: __dirname + "/dist",
    filename: "bundle.js"
  },
  devtool: "#source-map",
  module: {
    loaders: [
      // Transpile any JavaScript file:
      {test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader'}
    ]
  },
  resolve: {
    // you can now require('file') instead of require('file.js')
    extensions: ['', '.js', '.json']
  }
}

0 个答案:

没有答案