webpack/examples/source-map/webpack.config.js

30 lines
578 B
JavaScript
Raw Normal View History

2024-07-31 09:56:53 +08:00
const path = require("path");
module.exports = [
2019-09-12 19:54:34 +08:00
"eval",
2019-10-18 21:10:26 +08:00
"eval-cheap-source-map",
"eval-cheap-module-source-map",
"eval-source-map",
2019-09-12 19:54:34 +08:00
"cheap-source-map",
"cheap-module-source-map",
"inline-cheap-source-map",
"inline-cheap-module-source-map",
"source-map",
"inline-source-map",
2019-09-12 19:54:34 +08:00
"hidden-source-map",
"nosources-source-map"
].map(devtool => ({
2017-11-21 18:04:18 +08:00
mode: "development",
entry: {
2018-02-25 09:00:20 +08:00
bundle: "coffee-loader!./example.coffee"
},
output: {
path: path.join(__dirname, "dist"),
2018-02-25 09:00:20 +08:00
filename: `./[name]-${devtool}.js`
},
devtool,
optimization: {
runtimeChunk: true
}
}));