Merge branch 'feature/build-perf' into develop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
commit
9747dec1f9
|
@ -46,6 +46,8 @@ pipeline:
|
||||||
|
|
||||||
node-build:
|
node-build:
|
||||||
image: node:16-slim
|
image: node:16-slim
|
||||||
|
environment:
|
||||||
|
- CPU_COUNT=3
|
||||||
commands:
|
commands:
|
||||||
- npm install -g svg2ttf ttf2eot ttf2woff2
|
- npm install -g svg2ttf ttf2eot ttf2woff2
|
||||||
- svg2ttf assets/fonts/deblan/src/deblan-icon.svg assets/fonts/deblan/deblan-icon.ttf
|
- svg2ttf assets/fonts/deblan/src/deblan-icon.svg assets/fonts/deblan/deblan-icon.ttf
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
const Encore = require('@symfony/webpack-encore');
|
const Encore = require('@symfony/webpack-encore');
|
||||||
|
// const SpeedMeasurePlugin = require("speed-measure-webpack-plugin");
|
||||||
|
// const smp = new SpeedMeasurePlugin();
|
||||||
|
|
||||||
// Manually configure the runtime environment if not already configured yet by the "encore" command.
|
// Manually configure the runtime environment if not already configured yet by the "encore" command.
|
||||||
// It's useful when you use tools that rely on webpack.config.js file.
|
// It's useful when you use tools that rely on webpack.config.js file.
|
||||||
|
@ -6,6 +8,8 @@ if (!Encore.isRuntimeEnvironmentConfigured()) {
|
||||||
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TERSER_PARALLEL = process.env.hasOwnProperty('CPU_COUNT') ? parseInt(process.env.CPU_COUNT) : true;
|
||||||
|
|
||||||
Encore
|
Encore
|
||||||
// directory where compiled assets will be stored
|
// directory where compiled assets will be stored
|
||||||
.setOutputPath('public/build/')
|
.setOutputPath('public/build/')
|
||||||
|
@ -49,6 +53,10 @@ Encore
|
||||||
config.plugins.push('@babel/plugin-proposal-class-properties');
|
config.plugins.push('@babel/plugin-proposal-class-properties');
|
||||||
})
|
})
|
||||||
|
|
||||||
|
.configureTerserPlugin((config) => {
|
||||||
|
config.parallel = TERSER_PARALLEL;
|
||||||
|
})
|
||||||
|
|
||||||
// enables @babel/preset-env polyfills
|
// enables @babel/preset-env polyfills
|
||||||
.configureBabelPresetEnv((config) => {
|
.configureBabelPresetEnv((config) => {
|
||||||
config.useBuiltIns = 'usage';
|
config.useBuiltIns = 'usage';
|
||||||
|
|
Loading…
Reference in a new issue