0
0
Fork 0
mirror of https://github.com/kevinpapst/kimai2.git synced 2025-05-02 00:10:00 +00:00
kevinpapst_kimai2/webpack.config.js
Kevin Papst 02bcd45116
Release 2.5.0 (#4454)
- added command to list users
- corrected wrong german translation
- work contract validations
- prevent error with missing params
- use collapsible, minor UI improvement
- added classes to target menu buttons in custom rules
- disable webpack notifier, incompatible with mac arm
- use explicit menu service to generate menu
- bump to fontawesome 6 and replace restart icon
- change repeat icon for recent activities
- moved user bookmarks (favorites) to top nav
- fix totp seconds window (leeway)
- new migration to fix remaining user preferences with dots in name
- remove duplicate named column in user screen
- unify and added translations
- added missing filter and tags to InvoiceSecurity
2023-12-01 11:38:17 +01:00

64 lines
1.9 KiB
JavaScript

// Hint: if something doesn't work as expected: yarn upgrade --latest
const Encore = require('@symfony/webpack-encore');
Encore
.setOutputPath('public/build/')
.setPublicPath('/build/')
.setManifestKeyPrefix('build/')
.cleanupOutputBeforeBuild()
.addEntry('app', './assets/app.js')
.addEntry('export-pdf', './assets/export-pdf.js')
.addEntry('invoice', './assets/invoice.js')
.addEntry('invoice-pdf', './assets/invoice-pdf.js')
.addEntry('chart', './assets/chart.js')
.addEntry('calendar', './assets/calendar.js')
.addEntry('dashboard', './assets/dashboard.js')
.splitEntryChunks()
.configureSplitChunks(function(splitChunks) {
splitChunks.chunks = 'async';
})
// in the past there was a bug with empty hashes in entrypoints.json, disable if it happens again
.enableIntegrityHashes(Encore.isProduction())
.enableSingleRuntimeChunk()
.enableVersioning(Encore.isProduction())
.enableSourceMaps(!Encore.isProduction())
// disabled as ""webpack-notifier": "^1.13"" id currently only compatible with rosetta
//.enableBuildNotifications()
.enableSassLoader(function(sassOptions) {}, {
resolveUrlLoader: false
})
.configureCssMinimizerPlugin((options) => {
options.minimizerOptions = {
preset: ['default', { discardComments: { removeAll: true } }],
}
})
// compress javascript in production build
.configureTerserPlugin((options) => {
options.terserOptions = {
compress: true,
output: {
comments: false,
},
// chart.js will fail if sources are mangled
/*
mangle: {
properties: {
regex: /^_/,
},
},
*/
}
})
.enableEslintPlugin()
;
module.exports = Encore.getWebpackConfig();