1.3.0 • Published 1 year ago
exposed-nuxt v1.3.0
Exposed Nuxt
Nuxt module that attaches NuxtApp
and onNuxtReady
to \
window object on client.
Setup
npm i exposed-nuxt # npm
yarn add exposed-nuxt # yarn
pnpm add exposed-nuxt # pnpm
Usage
The only thing you need to do to use the module in the default configuration is to register the module in the modules
array in nuxt.config.ts
:
// nuxt.config.js
{
modules: [
"exposed-nuxt",
],
exposedNuxt: { // optional
// global name for NuxtApp
globalName: '$nuxt',
// plugin's order
order: 0,
}
}
window.$nuxt.$router.getRoutes();
window.onNuxtReady(() => console.log('Nuxt is up and running !'));