Webpack-dev-server serves old file content -
i have simple project:
appdir +- app +- main.js +- build +- bundle.js +- index.html +- webpack.config.js
the webpack.config.js:
var path=require("path"); module.exports = { entry: path.resolve(__dirname, "./app/main.js"), output: { path: path.resolve(__dirname, "build"), filename: "bundle.js" } };
after changs main.js
, webpack-dev-server seems detects change , performs rebundle bundle.js
, browser still recieve old content of main.js
.
i start server executing webpack-dev-server webpack.config.js
any ideas?
looking https://github.com/webpack/webpack-dev-server/issues/24 , add publicpath
webpack.config.js
, webpack serves bundle new content ^_^
var path=require("path"); module.exports = { entry: path.resolve(__dirname, "./app/main.js"), output: { path: path.resolve(__dirname, "build"), filename: "bundle.js", publicpath: "/build/", }, devserver: { } };
Comments
Post a Comment