Skip to content
On this page

Setup

Libraries

📦 Requirements

Installation

Add nuxt-splitty dependency to your project:

yarn add nuxt-splitty
yarn add nuxt-splitty

Then, add nuxt-splitty to the modules section of nuxt.config.ts:

import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
  modules: ['nuxt-splitty']
})
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
  modules: ['nuxt-splitty']
})

Configure

import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
  modules: [
    'nuxt-splitty'
  ],
  nuxtMicroServices: {
    /* module options */
  },
})
import { defineNuxtConfig } from 'nuxt'

export default defineNuxtConfig({
  modules: [
    'nuxt-splitty'
  ],
  nuxtMicroServices: {
    /* module options */
  },
})

WARNING

It's recommended to use the nuxt-splitty.config.ts file for module configuration to keep nuxt.config.ts clean.

import { defineConfig } from 'nuxt-splitty'

export default defineConfig({
  modules: {
    npm: [
      '@scope/ui-module',
    ],
    local: [
      'core',
      'cart',
      // 'ui',
    ],
  },

  i18n: {
    locales: ['de', 'en'],
  },

  pinia: {
    disabled: true,
  },

  theme: {
    name: 'mdm',
  },

  // ...
})
import { defineConfig } from 'nuxt-splitty'

export default defineConfig({
  modules: {
    npm: [
      '@scope/ui-module',
    ],
    local: [
      'core',
      'cart',
      // 'ui',
    ],
  },

  i18n: {
    locales: ['de', 'en'],
  },

  pinia: {
    disabled: true,
  },

  theme: {
    name: 'mdm',
  },

  // ...
})

INFO

More about module options here!

For Internal Use Only