Exposing node module packages #2239
Unanswered
MohammedAshikKP
asked this question in
Q&A
Replies: 1 comment
-
Please ignore this thread as this was some issue with my webpack config. Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to share all common deps for my project from a seperate repo.
i tried the following code
//host app - webpack.config.js
name: "dependency_lib", filename: "remoteEntry.js", exposes: { './react': 'react', './react-router': 'react-router', './redux': 'redux', }
and consuming like this
remotes: { dep_lib: 'dependency_lib@http://localhost:8888', },
import react from 'dep_lib/react
this is perfectly working fine ,but other that these packages none other package can be exposed
i tried
name: "dependency_lib", filename: "remoteEntry.js", exposes: { './react': 'react', './react-router': 'react-router', './redux': 'redux', './moment':'moment' }
but momentjs cant be exposed it is showing
react_devtools_backend.js:4026 ChunkLoadError: Loading chunk 633 failed.
for every other npm package this is same.. any idea how to solve this?
Beta Was this translation helpful? Give feedback.
All reactions