-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.config.js
33 lines (31 loc) · 1.01 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
var Encore = require('@symfony/webpack-encore');
Encore
.setOutputPath('public/build/')
.setPublicPath('/build')
.cleanupOutputBeforeBuild()
.enableTypeScriptLoader()
.addEntry('app', './assets/js/application.js')
.addStyleEntry('global', './assets/scss/application.scss')
.cleanupOutputBeforeBuild()
.autoProvidejQuery()
.enableStimulusBridge('./assets/controllers.json')
.enableSourceMaps(!Encore.isProduction())
.enableVersioning(Encore.isProduction())
// 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)$/
})
.disableSingleRuntimeChunk()
.configureBabel(() => {}, {
useBuiltIns: 'entry',
corejs: 3
})
;
module.exports = Encore.getWebpackConfig();