Adds a black-terminal tutorial page at /game/pregame/{session} that walks
players through help, pwd, cd, ls, cat, rm and sudo before the real game
starts. Links to it are shown on both the lobby (waiting for players) and
ready-up screens so players can practice, repeatedly, before starting.
36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
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')
|
|
.addEntry('pregame', './assets/pregame.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())
|
|
.enableSassLoader()
|
|
// Babel config for wide browser support
|
|
.configureBabelPresetEnv((options) => {
|
|
options.useBuiltIns = 'usage';
|
|
options.corejs = 3;
|
|
options.bugfixes = true;
|
|
})
|
|
.enableBuildNotifications()
|
|
;
|
|
|
|
module.exports = Encore.getWebpackConfig();
|