originjs / vite-plugin-federation

Module Federation for vite & rollup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue2.7, Vite host with webpack remote, "shared" create undefiend paramter(with Reproduction project)

SYNTEC-10101348 opened this issue · comments

Versions

  • vite-plugin-federation: 1.3.5
  • vite: 3.0.2

Reproduction

https://github.com/SYNTEC-10101348/MFShare

Steps to reproduce

  1. in webpack project , find the vue.runtime.esm in node_modules, add test code

image
2. build webpack project then host the webiste
3. configure vite to use webpack MF data, find the vue.runtime.esm in node_modules, add test code
4. run vite dev , navigate to http://localhost:8081/test
5.
when share setting is marked in vite
=> vue.js from vite and webpack both will be used

image

when share setting is on in vite
=> only vue.js from vite will be used but "ref" parameter is null
image

What is Expected?

the "ref" parameter should not be undefined when shared setting is on
singleton without error

What is actually happening?

ref is undefined