forked from monsieurbiz/SyliusRichEditorPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
40 lines (33 loc) · 1.05 KB
/
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
37
38
39
40
const Encore = require('@symfony/webpack-encore');
Encore
// directory where compiled assets will be stored
.setOutputPath('src/Resources/public')
// public path used by the web server to access the output path
.setPublicPath('/public')
// entries
.addEntry('rich-editor-js', './assets/js/app.js')
.addStyleEntry('rich-editor-css', './assets/css/app.scss')
// copy images
.copyFiles({
from: './assets/images',
to: 'images/[path][name].[ext]',
includeSubdirectories: true,
pattern: /\.(png|jpg|jpeg|svg)$/
})
// configuration
.disableSingleRuntimeChunk()
.cleanupOutputBeforeBuild()
.enableSourceMaps(!Encore.isProduction())
.enableVersioning(Encore.isProduction())
// enables Sass/SCSS support
.enableSassLoader()
// enables PostCSS support
.enablePostCssLoader()
// organise files
.configureFilenames({
js: 'js/[name].js',
css: 'css/[name].css',
images: 'images/[name].[ext]'
})
;
module.exports = Encore.getWebpackConfig();