-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebpack.config.js
More file actions
49 lines (42 loc) · 1.08 KB
/
webpack.config.js
File metadata and controls
49 lines (42 loc) · 1.08 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
const Encore = require('@symfony/webpack-encore');
Encore
.setOutputPath('public/')
.setPublicPath('/bundles/markocupicresourcebooking')
.setManifestKeyPrefix('')
//.addEntry('backend', './assets/backend.js')
//.addEntry('frontend', './assets/frontend.js')
.copyFiles({
from: './assets/audio',
to: 'audio/[path][name].[hash:8].[ext]',
})
.copyFiles({
from: './assets/icons',
to: 'icons/[path][name].[ext]',
})
.copyFiles({
from: './assets',
to: 'js/[path][name].[hash:8].[ext]',
pattern: /(app\.js)$/,
})
.copyFiles({
from: './assets/styles',
to: 'css/[path][name].[hash:8].[ext]',
pattern: /(frontend\.css)$/,
})
.copyFiles({
from: './node_modules/vue/dist',
to: 'vue/[path][name].[hash:8].[ext]',
pattern: /(vue\.global\.prod\.js)$/,
})
.disableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableSourceMaps()
.enableVersioning()
// enables @babel/preset-env polyfills
.configureBabelPresetEnv((config) => {
config.useBuiltIns = 'usage';
config.corejs = 3;
})
.enablePostCssLoader()
;
module.exports = Encore.getWebpackConfig();