26 lines
660 B
JavaScript
26 lines
660 B
JavaScript
var Encore = require('@symfony/webpack-encore');
|
|
|
|
if (!Encore.isRuntimeEnvironmentConfigured()) {
|
|
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
|
}
|
|
|
|
Encore
|
|
.setOutputPath('public/build/')
|
|
.setPublicPath('/build')
|
|
|
|
.addEntry('app', './assets/js/app.js')
|
|
.splitEntryChunks()
|
|
.enableSingleRuntimeChunk()
|
|
.cleanupOutputBeforeBuild()
|
|
.enableBuildNotifications()
|
|
.enableSourceMaps(!Encore.isProduction())
|
|
.enableVersioning(Encore.isProduction())
|
|
.configureBabel(() => {}, {
|
|
useBuiltIns: 'usage',
|
|
corejs: 3
|
|
})
|
|
.enablePostCssLoader()
|
|
;
|
|
|
|
module.exports = Encore.getWebpackConfig();
|