2023-08-10 00:10:54 +00:00
|
|
|
const Encore = require('@symfony/webpack-encore');
|
2017-03-31 18:21:41 +00:00
|
|
|
|
2023-08-10 00:10:54 +00:00
|
|
|
if (!Encore.isRuntimeEnvironmentConfigured()) {
|
|
|
|
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
2017-03-31 18:21:41 +00:00
|
|
|
}
|
|
|
|
|
2023-08-10 00:10:54 +00:00
|
|
|
Encore
|
|
|
|
.setOutputPath('web/build/')
|
|
|
|
.setPublicPath('/build')
|
|
|
|
.addEntry('main', './assets/index.js')
|
|
|
|
.addEntry('public', './assets/share.js')
|
|
|
|
.splitEntryChunks()
|
|
|
|
.enableSingleRuntimeChunk()
|
|
|
|
.cleanupOutputBeforeBuild()
|
|
|
|
.enableBuildNotifications()
|
|
|
|
.enableSourceMaps(!Encore.isProduction())
|
|
|
|
.enableVersioning(Encore.isProduction())
|
|
|
|
.configureBabelPresetEnv((config) => {
|
|
|
|
config.modules = false;
|
|
|
|
config.useBuiltIns = 'usage';
|
|
|
|
config.corejs = '3.23';
|
|
|
|
})
|
|
|
|
.enableSassLoader()
|
|
|
|
.enablePostCssLoader()
|
2025-02-14 23:23:46 +00:00
|
|
|
.autoProvidejQuery();
|
2023-08-10 00:10:54 +00:00
|
|
|
|
|
|
|
module.exports = Encore.getWebpackConfig();
|