misc webpack tweaks (#9924)
- reduce verbosity during build - use array form `use` to allow easier extension - disable uninteresting source maps - disable symlink resolution for a speedup Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net>
This commit is contained in:
parent
81daf26878
commit
c7fe028db4
2
Makefile
2
Makefile
@ -479,7 +479,7 @@ js: node-check fomantic $(JS_DEST)
|
|||||||
|
|
||||||
$(JS_DEST): node_modules $(JS_SOURCES)
|
$(JS_DEST): node_modules $(JS_SOURCES)
|
||||||
npx eslint web_src/js webpack.config.js
|
npx eslint web_src/js webpack.config.js
|
||||||
npx webpack
|
npx webpack --hide-modules --display-entrypoints=false
|
||||||
|
|
||||||
.PHONY: fomantic
|
.PHONY: fomantic
|
||||||
fomantic: node-check $(FOMANTIC_DEST_DIR)
|
fomantic: node-check $(FOMANTIC_DEST_DIR)
|
||||||
|
@ -38,7 +38,8 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
use: {
|
use: [
|
||||||
|
{
|
||||||
loader: 'babel-loader',
|
loader: 'babel-loader',
|
||||||
options: {
|
options: {
|
||||||
presets: [
|
presets: [
|
||||||
@ -60,7 +61,8 @@ module.exports = {
|
|||||||
'@babel/plugin-proposal-object-rest-spread',
|
'@babel/plugin-proposal-object-rest-spread',
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.css$/i,
|
test: /\.css$/i,
|
||||||
@ -73,6 +75,8 @@ module.exports = {
|
|||||||
new SourceMapDevToolPlugin({
|
new SourceMapDevToolPlugin({
|
||||||
filename: '[name].js.map',
|
filename: '[name].js.map',
|
||||||
exclude: [
|
exclude: [
|
||||||
|
'gitgraph.js',
|
||||||
|
'jquery.js',
|
||||||
'swagger.js',
|
'swagger.js',
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
@ -84,4 +88,7 @@ module.exports = {
|
|||||||
return !filename.endsWith('.map') && filename !== 'swagger.js';
|
return !filename.endsWith('.map') && filename !== 'swagger.js';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
resolve: {
|
||||||
|
symlinks: false,
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user