Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

MetaSPA/Core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meta Single Page Application (WIP)

DEPRECATION NOTICE

Since Webpack Module Federation has been released, This project will be DEPRECATED


npm

This is a POC for micro frontend. The MetaSPA Core uses a predefined webpack JSONP format to import modules from different independent webpack builds. The most fantastic and magic is that it can import builds in RUN TIME!

In the example, we are using preact/react-router in master SPA (we are using preact for better bundle size). The master SPA will nestedly route a react component and vue component.

POC Example Usage

  • Install core dependencies
#From project root
cd ./core
npm install
  • Install example dependencies
#From project root
cd ./test
npm install
  • To avoid type conflict of react and preact (@types/react will be automatically installed due to some other modules), delete the @types/react
#From project root
cd ./test
rm -rf node_modules/@types/react
#From project root
cd ./test
npm run serve:static
npm run serve