-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
31 lines (29 loc) · 921 Bytes
/
webpack.config.js
File metadata and controls
31 lines (29 loc) · 921 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
27
28
29
30
31
var Encore = require('@symfony/webpack-encore');
Encore
.setOutputPath('public/build/')
.copyFiles({
from: './assets/images',
to: './images/[path][name].[ext]',
})
.setPublicPath('/build')
.cleanupOutputBeforeBuild()
.addStyleEntry('global', './assets/scss/application.scss')
.addLoader({test: /\.scss$/, loader: 'webpack-import-glob-loader'})
// Convert sass files.
.enableSassLoader(function (options) {
options.api = 'modern';
options.sassOptions = {
outputStyle: 'expanded',
includePaths: ['public'],
};
})
.autoProvideVariables({
$: 'jquery',
jQuery: 'jquery'
})
.enableSingleRuntimeChunk()
.enableSourceMaps(!Encore.isProduction())
// enables hashed filenames (e.g. app.abc123.css)
.enableVersioning(Encore.isProduction())
;
module.exports = Encore.getWebpackConfig();