mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
pages loading twice poc
Cherry-picked from original branch started from Angular 13 PR
This commit is contained in:

committed by
Yura Bondarenko

parent
e4f483c308
commit
3bc5ee0253
@@ -3,14 +3,39 @@ import { join } from 'path';
|
||||
import { buildAppConfig } from '../src/config/config.server';
|
||||
import { commonExports } from './webpack.common';
|
||||
|
||||
const CompressionPlugin = require('compression-webpack-plugin');
|
||||
const zlib = require('zlib');
|
||||
|
||||
module.exports = Object.assign({}, commonExports, {
|
||||
target: 'web',
|
||||
node: {
|
||||
module: 'empty'
|
||||
},
|
||||
plugins: [
|
||||
...commonExports.plugins,
|
||||
new CompressionPlugin({
|
||||
filename: '[path][base].gz',
|
||||
algorithm: 'gzip',
|
||||
test: /\.(js|css|html|svg)$/,
|
||||
threshold: 10240,
|
||||
minRatio: 0.8,
|
||||
}),
|
||||
new CompressionPlugin({
|
||||
filename: '[path][base].br',
|
||||
algorithm: 'brotliCompress',
|
||||
test: /\.(js|css|html|svg)$/,
|
||||
compressionOptions: {
|
||||
params: {
|
||||
[zlib.constants.BROTLI_PARAM_QUALITY]: 11,
|
||||
},
|
||||
},
|
||||
threshold: 10240,
|
||||
minRatio: 0.8,
|
||||
}),
|
||||
],
|
||||
devServer: {
|
||||
before(app, server) {
|
||||
buildAppConfig(join(process.cwd(), 'src/assets/config.json'));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user