mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
Speed up development builds slightly
This commit is contained in:
parent
32a639ef95
commit
83d7b7a7f8
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
.awcache/
|
||||
.idea/
|
||||
node_modules/
|
||||
web-dist/
|
||||
|
1032
package-lock.json
generated
1032
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -61,6 +61,8 @@
|
||||
"@angular/router": "^5.2.11",
|
||||
"@angularclass/hmr": "^2.1.0",
|
||||
"@angularclass/hmr-loader": "^3.0.2",
|
||||
"@babel/core": "^7.2.2",
|
||||
"@babel/preset-env": "^7.2.3",
|
||||
"@fortawesome/fontawesome": "^1.1.8",
|
||||
"@fortawesome/fontawesome-free-brands": "^5.0.13",
|
||||
"@fortawesome/fontawesome-free-regular": "^5.0.13",
|
||||
|
@ -8,7 +8,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||
const isProd = process.env.npm_lifecycle_event.startsWith('build');
|
||||
|
||||
module.exports = function () {
|
||||
var config = {};
|
||||
const config = {};
|
||||
|
||||
if (isProd) config.devtool = 'source-map';
|
||||
else config.devtool = 'eval-source-map';
|
||||
@ -34,7 +34,20 @@ module.exports = function () {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/,
|
||||
loaders: ['awesome-typescript-loader', 'angular2-template-loader', '@angularclass/hmr-loader'],
|
||||
loaders: [{
|
||||
loader: 'awesome-typescript-loader',
|
||||
options: {
|
||||
useCache: true,
|
||||
useBabel: true,
|
||||
babelOptions: {
|
||||
babelrc: false,
|
||||
presets: [
|
||||
["@babel/preset-env", {"targets": "last 2 versions, ie 11", "modules": false}]
|
||||
],
|
||||
},
|
||||
babelCore: "@babel/core",
|
||||
},
|
||||
}, 'angular2-template-loader', '@angularclass/hmr-loader'],
|
||||
exclude: [/node_modules\/(?!(ng2-.+))/]
|
||||
},
|
||||
{
|
||||
@ -110,10 +123,6 @@ module.exports = function () {
|
||||
new HtmlWebpackPlugin({
|
||||
template: './web/public/index.html',
|
||||
chunksSortMode: 'dependency'
|
||||
}),
|
||||
new MiniCssExtractPlugin({
|
||||
filename: 'css/[name].[hash].css',
|
||||
disable: !isProd
|
||||
})
|
||||
];
|
||||
|
||||
@ -123,6 +132,11 @@ module.exports = function () {
|
||||
from: root('web/public')
|
||||
}])
|
||||
);
|
||||
config.plugins.push(
|
||||
new MiniCssExtractPlugin({
|
||||
filename: 'css/[name].[hash].css',
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
config.devServer = {
|
||||
|
Loading…
Reference in New Issue
Block a user