webpack-dev-server不断提供旧文件

时间:2015-04-07 17:31:59

标签: webpack

我正在运行webpack-dev-server并且它一直在提供旧文件,任何想法?

我在项目中删除了对foo.js的任何引用

enter image description here

我的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']
  }
}

1 个答案:

答案 0 :(得分:0)

尝试使用以下选项:

webpack-dev-server --hot --inline