This commit is contained in:
Frank
2026-01-02 20:27:56 +01:00
parent 534175efb3
commit 0d6628e7c9
45 changed files with 12279 additions and 2911 deletions

34
webpack.config.js Normal file
View File

@@ -0,0 +1,34 @@
const Encore = require('@symfony/webpack-encore');
if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}
Encore
// where compiled assets will be stored
.setOutputPath('public/build/')
// public path used by the web server to access the output path
.setPublicPath('/build')
// clean output before build
.cleanupOutputBeforeBuild()
// main entry for your app
.addEntry('app', './assets/app.js')
.addEntry('game1', './assets/game1.js')
// split entry chunks for better caching
.splitEntryChunks()
// will require an extra script tag for runtime.js
.enableSingleRuntimeChunk()
// features
.enableSourceMaps(!Encore.isProduction())
.enableVersioning(Encore.isProduction())
// Babel config for wide browser support
.configureBabelPresetEnv((options) => {
options.useBuiltIns = 'usage';
options.corejs = 3;
options.bugfixes = true;
})
.autoProvidejQuery(false)
.enableBuildNotifications()
;
module.exports = Encore.getWebpackConfig();