2021-06-30 07:00:00 +00:00
|
|
|
let Encore = require('@symfony/webpack-encore')
|
|
|
|
let path = require('path')
|
|
|
|
|
|
|
|
Encore
|
|
|
|
.disableSingleRuntimeChunk()
|
|
|
|
.cleanupOutputBeforeBuild()
|
2021-06-30 07:00:00 +00:00
|
|
|
.setOutputPath('source/build/')
|
2021-06-30 07:00:00 +00:00
|
|
|
.setPublicPath('/build')
|
|
|
|
.setManifestKeyPrefix('build/')
|
|
|
|
|
|
|
|
.addEntry('app', '@/app.js')
|
|
|
|
|
|
|
|
.enablePostCssLoader()
|
|
|
|
|
|
|
|
.addAliases({
|
|
|
|
'@': path.resolve(__dirname, 'assets', 'js'),
|
|
|
|
styles: path.resolve(__dirname, 'assets', 'css')
|
|
|
|
})
|
|
|
|
|
|
|
|
if (!Encore.isProduction()) {
|
|
|
|
Encore.enableSourceMaps()
|
|
|
|
}
|
|
|
|
|
|
|
|
process.env.NODE_ENV =
|
|
|
|
process.env.NODE_ENV || Encore.isProduction() ? 'production' : 'development';
|
|
|
|
|
|
|
|
module.exports = Encore.getWebpackConfig()
|