single-spa-container
v1.0.1
Published
micro frontend container for vue and other plugins
Downloads
3
Readme
single-spa-container
Install development environment dependencies
install create-single-spa
npm install —global create-single-spa
install vue-cli3
npm install -g @vue/cli
Create project
Front-end microservices are divided into two steps:
Create a microservice container, the single-spa framework.
Create a microservice module, and the sub-applications are the various service modules in the microservice.
Create a microservice container
npm i sinle-spa-container -s
Create a microservice module
- Create a sub-application
vue create sub-app1
- Add single-spa plugin
vue add single-spa
- Modified as a front-end microservice application
vue add 4singlespa
Configure microservice container
// todo
single-spa html
Configure microservice module
Extract dependencies and optimize file size after packaging:
// todo
vue.config.js
other
- System.js is used in the microservice container, This is a module loader that provides a backward compatible workflow for ES modules in the browser.
- Source code:single-spa-contianer, vue-cli-plugin-4singlespa, any questions please issue.