-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.js
41 lines (37 loc) · 1.23 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
41
var Encore = require('@symfony/webpack-encore');
Encore
.setOutputPath('public/build/')
.copyFiles([
{
from: './assets/images',
to: './images/[path][name].[ext]',
},
{
from: './assets/openconext/images',
to: './images/logo/[path][name].[ext]',
}
])
.setPublicPath('/build')
.cleanupOutputBeforeBuild()
// Convert typescript files.
.enableTypeScriptLoader()
.addStyleEntry('global', './assets/scss/application.scss')
.addEntry('authentication', './assets/typescript/authentication.ts')
.addEntry('registration', './assets/typescript/registration.ts')
// Convert sass files.
.enableSassLoader(function (options) {
options.sassOptions = {
outputStyle: 'expanded',
includePaths: ['public'],
};
})
.addLoader({test: /\.scss$/, loader: 'webpack-import-glob-loader'})
.configureLoaderRule('eslint', loaderRule => {
loaderRule.test = /\.(jsx?|vue)$/
})
.enableSingleRuntimeChunk()
.enableSourceMaps(!Encore.isProduction())
// enables hashed filenames (e.g. app.abc123.css)
.enableVersioning(Encore.isProduction())
;
module.exports = Encore.getWebpackConfig();