-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathwebpack.config.js
More file actions
26 lines (23 loc) · 906 Bytes
/
webpack.config.js
File metadata and controls
26 lines (23 loc) · 906 Bytes
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
const Encore = require('@symfony/webpack-encore');
const path = require('path');
if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}
Encore
.setOutputPath('public/build/')
.setPublicPath('/build')
.addEntry('app', './vendor/phplist/web-frontend/assets/app.js')
.addStyleEntry('styles', './vendor/phplist/web-frontend/assets/styles/app.css')
.enableVueLoader(() => {}, { version: 3 })
.enableSingleRuntimeChunk()
.enablePostCssLoader()
.copyFiles({
from: './vendor/phplist/web-frontend/assets/images',
to: 'images/[path][name].[hash:8].[ext]',
})
.addAliases({
'@': path.resolve(__dirname, 'vendor/phplist/web-frontend/assets'),
'@images': path.resolve(__dirname, 'vendor/phplist/web-frontend/assets/images'),
})
;
module.exports = Encore.getWebpackConfig();