Open
Description
Version
5.0.0-rc.0
Reproduction link
Environment info
System:
OS: Windows 10 10.0.18363
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Binaries:
Node: 14.17.4 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
npm: 7.24.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 95.0.4638.69
Edge: Spartan (44.18362.1533.0)
npmGlobalPackages:
@vue/cli: Not Found
Steps to reproduce
serve the app-one
project.
server the consumer
project.
open the consumer server. You will see that it says it cannot load the remoteScript which probably is because of an error in the generated script and it doesn't happen in vue-cli@5.0.0-beta.3
What is expected?
It is expected that the remote script runs to the end and initiate the remote namespace to be used inside the consumer project.
What is actually happening?
The remote namespace at the end of the script is always undefined. this part is also probably generated by webpack but I think the error is happening where vue-cli injects some additional codes in there right before the last line.
I have also a working example which you can check https://github.com/farhadnowzari/vue-cli-module-federation-working-example.