Using frontend microservices with Nuxt, support qiankun now
- Add
@femessage/nuxt-micro-frontenddependency to your project
yarn add @femessage/nuxt-micro-frontend -D
# or npm install @femessage/nuxt-micro-frontend- Add
@femessage/nuxt-micro-frontendto themodulessection ofnuxt.config.js
{
modules: [
// Simple usage
'@femessage/nuxt-micro-frontend',
// With options
['@femessage/nuxt-micro-frontend', { /* module options */ }]
]
}If want to set headers recommend to set
build.devMiddleware.headers, see Nuxt API: The build Property > devMiddleware
path: the MFE lifecycle hook file path relative to rootDir
force: skip version check and force to use this module
unique: If use qiankun, sub application's package name should unique. Set unique to true can create a unique umd target.
- qiankun
- single-SPA waiting for test and verify
- add
mountedandbeforeUnmounthook to get vue instance
- Clone this repository
- Install dependencies using
yarn installornpm install - Start development server using
npm run dev
Copyright (c) FEMessage