webpack-dev-server --config webpack.config3.jsvar path = require("path");module.exports = {entry: { app: ["./app/main.js"]
},output: { path: path.resolve(__dirname, 'build'),
filename: 'bundle.js'}}下面是html中訪問的路徑 <script src="bundle.js"></script>我發(fā)現 隨便修改output path 對html的引用 沒有任何影響(只有publicPath會影響 ,比如pubblicPath:為assets 那么上面的src= "assets/bundle.js") ,而且直接訪問 http://localhost:8080/build/b... 也是訪問不到這個文件的 ,如果 這個文件是在內存中存儲 , bundle.js怎么才能訪問到呢 (除了 html中引用的路徑 不等于output path的路徑)?
webpack-dev-server ouput .path 的作用是什么
慕雪6442864
2018-10-17 10:09:46