mirror of
https://github.com/wallabag/wallabag.git
synced 2025-02-22 21:46:17 +00:00
27 lines
772 B
JavaScript
27 lines
772 B
JavaScript
const Encore = require('@symfony/webpack-encore');
|
|
|
|
if (!Encore.isRuntimeEnvironmentConfigured()) {
|
|
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
|
}
|
|
|
|
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()
|
|
.autoProvidejQuery();
|
|
|
|
module.exports = Encore.getWebpackConfig();
|