MinimalReproduce Project
vite2test created by vite with vue2.7
my-project created by vue cli with vue2.7
--
- build webpack project
cd .\webpack\my-project
npm insall
npm run build
-
host the webpack website in any where
-
test MF with vite
cd .\vite\vite2test
npm install
- change the MF remote URL in vite.config.js to where you host the webpack project
//example: const myWebpackService = 'http://localhost:8080/';
const myWebpackService = 'http://localhost:8081/';
//example: const externalChildPath = `webpackTest/remoteEntry.js`;
const externalChildPath = `remoteEntry.js`;
- npm run dev then change the MF shared setting,
navigate to http://localhost:8081/test
see what will happened