webpack: Drop unnecessary output settings
The default of `path` and `sourceMapFilename` are already what we want, no need to set them explicitly. The `output.filename` is already `[name].js`, and it's totally not important to name the file differently in production mode (it will then just be `index.js.gz`, compared to index.js in development mode).
This commit is contained in:
parent
d3d1df5533
commit
8ea62cb4d7
1 changed files with 0 additions and 11 deletions
|
|
@ -12,7 +12,6 @@ var externals = {
|
|||
/* These can be overridden, typically from the Makefile.am */
|
||||
const srcdir = (process.env.SRCDIR || __dirname) + path.sep + "src";
|
||||
const builddir = (process.env.SRCDIR || __dirname);
|
||||
const distdir = builddir + path.sep + "dist";
|
||||
const section = process.env.ONLYDIR || null;
|
||||
const nodedir = path.resolve((process.env.SRCDIR || __dirname), "node_modules");
|
||||
|
||||
|
|
@ -31,12 +30,6 @@ var info = {
|
|||
],
|
||||
};
|
||||
|
||||
var output = {
|
||||
path: distdir,
|
||||
filename: "[name].js",
|
||||
sourceMapFilename: "[file].map",
|
||||
};
|
||||
|
||||
/*
|
||||
* Note that we're avoiding the use of path.join as webpack and nodejs
|
||||
* want relative paths that start with ./ explicitly.
|
||||
|
|
@ -84,9 +77,6 @@ var plugins = [
|
|||
|
||||
/* Only minimize when in production mode */
|
||||
if (production) {
|
||||
/* Rename output files when minimizing */
|
||||
output.filename = "[name].min.js";
|
||||
|
||||
plugins.unshift(new CompressionPlugin({
|
||||
test: /\.(js|html)$/,
|
||||
minRatio: 0.9,
|
||||
|
|
@ -126,7 +116,6 @@ module.exports = {
|
|||
},
|
||||
entry: info.entries,
|
||||
externals: externals,
|
||||
output: output,
|
||||
devtool: "source-map",
|
||||
module: {
|
||||
rules: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue