Nuxt Module
Runtime Defaults
Configure the Nuxt wrapper defaults that flow into the shared Phaser Vue plugin at runtime.
The module resolves its options once and writes them into runtimeConfig.public.phaser. The runtime plugin then installs createPhaserVue with that resolved state.
nuxt.config.ts
export default defineNuxtConfig({
modules: ['@onmax/nuxt-phaser'],
phaser: {
debug: process.env.NODE_ENV !== 'production',
defaults: {
pixelArt: false,
transparent: false,
suspendWhenHidden: true,
assetsBaseUrl: '/',
},
},
})
Defaulted options
| Option | Default |
|---|---|
autoImports | true |
components | true |
componentPrefix | 'Phaser' |
clientOnly | true |
debug | false |
devtools | false |
defaults.pixelArt | false |
defaults.transparent | false |
defaults.suspendWhenHidden | true |
defaults.assetsBaseUrl | '/' |
The wrapper does not invent runtime-only options beyond that surface. More advanced behavior still belongs in the shared host props and scene code.