webpack/test/configCases/plugins/source-map-dev-tool-plugin/webpack.config.js

30 lines
574 B
JavaScript
Raw Normal View History

"use strict";
2025-04-22 18:49:30 +08:00
const TerserPlugin = require("terser-webpack-plugin");
2025-07-03 17:06:45 +08:00
const webpack = require("../../../../");
2025-04-22 18:49:30 +08:00
/** @type {import("../../../../").Configuration} */
module.exports = {
node: {
__dirname: false,
__filename: false
},
entry: {
2018-02-25 09:00:20 +08:00
bundle0: ["./index.js"],
"public/test": ["./test.js"]
},
output: {
filename: "[name].js"
},
2017-12-13 23:05:21 +08:00
optimization: {
2020-10-15 15:18:42 +08:00
minimizer: [new TerserPlugin()]
2017-12-13 23:05:21 +08:00
},
plugins: [
new webpack.SourceMapDevToolPlugin({
filename: "sourcemaps/[file].map",
publicPath: "https://10.10.10.10/project/",
fileContext: "public"
})
]
};