1.7.0 • Published 2 years ago

@femessage/nuxt-micro-frontend v1.7.0

Weekly downloads
139
License
MIT
Repository
github
Last release
2 years ago

Nuxt-Micro-Frontend

All Contributors

Build Status NPM Download NPM Version NPM License PRs Welcome Automated Release Notes by gren

Using frontend microservices with Nuxt, support qiankun now

中文

Setup

  1. Add @femessage/nuxt-micro-frontend dependency to your project
yarn add @femessage/nuxt-micro-frontend -D 

# or npm install @femessage/nuxt-micro-frontend
  1. Add @femessage/nuxt-micro-frontend to the modules section of nuxt.config.js
{
  modules: [
    // Simple usage
    '@femessage/nuxt-micro-frontend',

    // With options
    ['@femessage/nuxt-micro-frontend', { /* module options */ }]
  ]
}

Module Options

Documents

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.

output: If use the other micro library, probably need to config the webpack output libraryTarget.

Support Micro Front-End Framework

LifeCycle hooks file example

Qiankun

  • add mounted and beforeUnmount hook to get vue instance

Development

  1. Clone this repository
  2. Install dependencies using yarn install or npm install
  3. Start development server using cd examples/normal && npm run dev

License

MIT License

Copyright (c) FEMessage

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

1.7.0

2 years ago

1.6.0

4 years ago

1.5.0

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago