Add Webpack Encore
This commit is contained in:
parent
6f059590cb
commit
70667da418
3 changed files with 3342 additions and 626 deletions
20
webpack.config.js
Normal file
20
webpack.config.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
var Encore = require('@symfony/webpack-encore');
|
||||
|
||||
Encore
|
||||
.setOutputPath('source/build/')
|
||||
.setPublicPath('/build')
|
||||
.cleanupOutputBeforeBuild()
|
||||
.enableLessLoader()
|
||||
.addEntry('js/site', './assets/js/main.js')
|
||||
.addStyleEntry('css/site', './assets/less/main.less')
|
||||
.enablePostCssLoader(function(options) {
|
||||
options.config = {
|
||||
path: 'config/postcss.config.js'
|
||||
};
|
||||
})
|
||||
.enableSourceMaps(!Encore.isProduction())
|
||||
.enableVersioning(false)
|
||||
.enableBuildNotifications()
|
||||
;
|
||||
|
||||
module.exports = Encore.getWebpackConfig();
|
Loading…
Add table
Add a link
Reference in a new issue