forked from terminal42/contao-fineuploader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
36 lines (28 loc) · 906 Bytes
/
webpack.config.js
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
const Encore = require('@symfony/webpack-encore');
Encore
.setOutputPath('public/')
.setPublicPath('/bundles/terminal42fineuploader')
.setManifestKeyPrefix('')
.addEntry('backend', './assets/backend.js')
.addEntry('frontend', './assets/frontend.js')
.copyFiles({
from: './node_modules/fine-uploader/fine-uploader',
to: 'fine-uploader/[path][name].[ext]'
})
.copyFiles({
from: './node_modules/sortablejs',
pattern: /Sortable\.min\.js$/,
to: 'sortable.[contenthash:8].min.js',
})
.disableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableSourceMaps()
.enableVersioning()
// enables @babel/preset-env polyfills
.configureBabelPresetEnv((config) => {
config.useBuiltIns = 'usage';
config.corejs = 3;
})
.enablePostCssLoader()
;
module.exports = Encore.getWebpackConfig();