Giter Club home page Giter Club logo

nuxt-micro-frontend's Introduction

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):


cjf

πŸ’» πŸ“– πŸ“ πŸ’‘

Han

πŸ’» πŸ–‹ πŸš‡

Munawar Bijani

πŸ›

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

nuxt-micro-frontend's People

Contributors

lianghx-319 avatar allcontributors[bot] avatar cjfff avatar levy9527 avatar deepenlau avatar munawarb avatar dream2023 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.