⚠️ You are looking at the english version of the page. Help us translate it here.
Ingin melihat dokumen baru kami? Kami dokumen baru sekarang dalam versi beta. Selamat bersenang-senang!

The globalName Property

Nuxt.js lets you customize the global ID used in the main HTML template as well as the main Vue instance name and other options.

  • Type: String
  • Default: nuxt

Example:

nuxt.config.js

{
  globalName: 'myCustomName'
}

It needs to be a valid JavaScript identifier.

The globals property

Customizes specific global names which are based on globalName by default.

  • Type: Object
  • Default:
{
  id: globalName => `__${globalName}`,
  nuxt: globalName => `$${globalName}`,
  context: globalName => `__${globalName.toUpperCase()}__`,
  pluginPrefix: globalName => globalName,
  readyCallback: globalName => `on${_.capitalize(globalName)}Ready`,
  loadedCallback: globalName => `_on${_.capitalize(globalName)}Loaded`
},

Kontributor

Kontribusi untuk halaman ini sekarang ditutup. Jika Anda ingin berkontribusi, silakan periksa dokumen baru sekarang dalam versi beta. Selamat bersenang-senang!

Platinum Sponsors

Storyblok Support Us