-
Notifications
You must be signed in to change notification settings - Fork 149
/
webpack.config.js
38 lines (32 loc) · 1.15 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
const Encore = require('@symfony/webpack-encore');
const path = require('path');
const getEzConfig = require('./ez.webpack.config.js');
const eZConfigManager = require('./ez.webpack.config.manager.js');
const eZConfig = getEzConfig(Encore);
const customConfigs = require('./ez.webpack.custom.configs.js');
Encore.reset();
Encore.setOutputPath('public/assets/build')
.setPublicPath('/assets/build')
.enableSassLoader()
.enableReactPreset()
.enableSingleRuntimeChunk()
.copyFiles({
from: './assets/images',
to: 'images/[path][name].[ext]',
pattern: /\.(png|svg)$/
});
// Welcome page stylesheets
Encore.addEntry('welcome_page', [
path.resolve(__dirname, './assets/scss/welcome-page.scss'),
]);
// Put your config here.
Encore.addEntry('app_js', [
path.resolve(__dirname, './assets/app.js'),
]);
Encore.addEntry('app_styles', [
path.resolve(__dirname, './assets/styles/app.css'),
]);
const projectConfig = Encore.getWebpackConfig();
module.exports = [ eZConfig, ...customConfigs, projectConfig ];
// uncomment this line if you've commented-out the above lines
// module.exports = [ eZConfig, ...customConfigs ];