Repository navigation
Expand file tree
/
Copy pathwebpack.config.js
More file actions
52 lines (46 loc) · 2.06 KB
/
Copy pathwebpack.config.js
File metadata and controls
52 lines (46 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
var Encore = require('@symfony/webpack-encore');
Encore
.setOutputPath('./public/')
.setPublicPath('')
.setManifestKeyPrefix('')
.cleanupOutputBeforeBuild()
.enableSourceMaps(false)
.enableVersioning(true)
.disableSingleRuntimeChunk()
.configureCssMinimizerPlugin((options) => {
options.minimizerOptions = {
preset: [
'default',
{
// disabled to fix these issues: https://github.com/EasyCorp/EasyAdminBundle/pull/5171
svgo: false,
// postcss-calc can't parse relative colors ('c * 0.8') or the 'cap' and 'lh' units;
// it leaves those values unchanged but prints a warning for each one
calc: false,
},
]
};
})
.addEntry('app', './assets/js/app.js')
.addEntry('form', './assets/js/form.js')
.addEntry('page-layout', './assets/js/page-layout.js')
.addEntry('page-color-scheme', './assets/js/page-color-scheme.js')
.addEntry('field-boolean', './assets/js/field-boolean.js')
.addEntry('field-code-editor', './assets/js/field-code-editor.js')
.addEntry('field-collection', './assets/js/field-collection.js')
.addEntry('field-file-upload', './assets/js/field-file-upload.js')
.addEntry('field-image', './assets/js/field-image.js')
.addEntry('field-slug', './assets/js/field-slug.js')
.addEntry('field-textarea', './assets/js/field-textarea.js')
.addEntry('field-text-editor', './assets/js/field-text-editor.js')
.addEntry('login', './assets/js/login.js')
// the font files are copied by the url() of assets/css/easyadmin-theme/fonts.css;
// their OFL license must be distributed with them
.copyFiles(['inter', 'ibm-plex-sans', 'rubik', 'atkinson-hyperlegible-next', 'jetbrains-mono'].map((font) => ({
from: `./node_modules/@fontsource-variable/${font}`,
pattern: /LICENSE$/,
includeSubdirectories: false,
to: `fonts/${font}-OFL.txt`,
})))
;
module.exports = Encore.getWebpackConfig();