forked from EasyCorp/EasyAdminBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
41 lines (34 loc) · 1.24 KB
/
webpack.config.js
File metadata and controls
41 lines (34 loc) · 1.24 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
var Encore = require('@symfony/webpack-encore');
Encore
.setOutputPath('./src/Resources/public/')
.setPublicPath('./')
.setManifestKeyPrefix('bundles/easyadmin')
.cleanupOutputBeforeBuild()
.enableSassLoader()
.enableSourceMaps(false)
.enableVersioning(false)
.disableSingleRuntimeChunk()
.autoProvidejQuery()
// needed to avoid this bug: https://github.com/symfony/webpack-encore/issues/436
.configureCssLoader(options => { options.minimize = false; })
.enablePostCssLoader()
// copy select2 i18n files
.copyFiles({
from: './node_modules/select2/dist/js/i18n/',
// relative to the output dir
to: 'select2/i18n/[name].[ext]',
// only copy files matching this pattern
pattern: /\.js$/
})
// copy flag images for country type
.copyFiles({
from: './assets/images/flags/',
to: 'images/flags/[path][name].[ext]',
pattern: /\.png$/
})
.addEntry('app', './assets/js/app.js')
.addEntry('app-rtl', './assets/js/app-rtl.js')
.addEntry('form-type-code-editor', './assets/js/form-type-code-editor.js')
.addEntry('form-type-text-editor', './assets/js/form-type-text-editor.js')
;
module.exports = Encore.getWebpackConfig();