exposed-nuxt
TypeScript icon, indicating that this package has built-in type declarations

1.3.0 • Public • Published

npm version npm downloads License Nuxt

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 !'));

Readme

Keywords

Package Sidebar

Install

npm i exposed-nuxt

Weekly Downloads

1

Version

1.3.0

License

MIT

Unpacked Size

6.41 kB

Total Files

12

Last publish

Collaborators

  • websavva