mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-08 08:43:53 +01:00
Speed up sourcemaps in dev mode
This commit is contained in:
parent
aa91e8aecc
commit
ba46262426
@ -22,7 +22,7 @@ module.exports = (env, argv) => {
|
|||||||
chunkModules: false,
|
chunkModules: false,
|
||||||
chunkOrigins: false,
|
chunkOrigins: false,
|
||||||
colors: true,
|
colors: true,
|
||||||
entrypoints: true,
|
entrypoints: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const devServerSettings = {
|
const devServerSettings = {
|
||||||
@ -106,10 +106,25 @@ module.exports = (env, argv) => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
],
|
// In dev mode, use a faster method of create sourcemaps
|
||||||
|
// while keeping lines/columns accurate
|
||||||
|
isDevServer &&
|
||||||
|
new webpack.EvalSourceMapDevToolPlugin({
|
||||||
|
// Exclude vendor files from sourcemaps
|
||||||
|
// This is a huge speed improvement for not much loss
|
||||||
|
exclude: ["vendor"],
|
||||||
|
columns: true,
|
||||||
|
module: true,
|
||||||
|
}),
|
||||||
|
!isDevServer &&
|
||||||
|
new webpack.SourceMapDevToolPlugin({
|
||||||
|
filename: "[file].map",
|
||||||
|
columns: true,
|
||||||
|
module: true,
|
||||||
|
}),
|
||||||
|
].filter(Boolean),
|
||||||
target: "web",
|
target: "web",
|
||||||
entry: entries,
|
entry: entries,
|
||||||
devtool: "source-map",
|
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, "./"),
|
path: path.resolve(__dirname, "./"),
|
||||||
filename: "[name].bundle.js",
|
filename: "[name].bundle.js",
|
||||||
|
Loading…
Reference in New Issue
Block a user