-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
42 lines (29 loc) · 1.18 KB
/
webpack.config.js
File metadata and controls
42 lines (29 loc) · 1.18 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
const Encore = require('@symfony/webpack-encore');
Encore
// the project directory where all compiled assets will be stored
.setOutputPath('./Resources/public')
// the public path used by the web server to access the previous directory
.setPublicPath('/bundles/unitecmscollectionfield')
// Used as a prefix to the *keys* in manifest.json
.setManifestKeyPrefix('')
.addEntry('main', './Resources/webpack/main.js')
// allow sass/scss files to be processed
.enableSassLoader(function(sassConfigOptions){
sassConfigOptions.includePaths = ['./node_modules'];
})
.configureBabel(() => {}, {
useBuiltIns: 'usage',
corejs: 3
})
// load vue components
.enableVueLoader()
// Enable sourcemaps in production mode
.enableSourceMaps(!Encore.isProduction())
// empty the outputPath dir before each build
.cleanupOutputBeforeBuild()
// versioning to avoid browser cache loading old assets
.enableVersioning(Encore.isProduction())
// We don't need a runtime.js for unite cms at the moment
.disableSingleRuntimeChunk();
// export the final configuration
module.exports = Encore.getWebpackConfig();