-
-
Couldn't load subscription status.
- Fork 1.8k
-
I'm new to webpack, and I searched the web and this forum for examples but none have matched my situation closely enough for me to recognize.
I have a working local site built by webpack using ./src/index.html as a template. I want to create one folder under src for each of my projects, which would include js, json, and css to override the template. At the end of a webpack build, there should be one output folder per project that can be uploaded to our CDN, so that each project has an unchanging query path, each of which is a standalone site.
Ideally, adding a new project folder in src would automatically create the corresponding output folder.
No framework like React is being used, but I plan to look into generic web components later.
Based on https://medium.com/paloit/a-beginners-guide-to-micro-frontends-with-webpack-module-federation-712f3855f813#b96a I think Module Federation is the best way to achieve this. But I cannot see how that example's mount fn would be used by the host's src/index.js to apply the overrides available in the project folders. And when the example says "Finally, your subA folder should have this structure", the structure looks like the top-level of a webpack project, not a 'subA' folder that would contain just a few override files.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments 2 replies
-
Check our documentation site. Framework bridges are what you want.
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
What do you mean pure js?
Like you dont use react or vue etc? just plain JS?
Do you have a repo example of what you want to do?
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
Dm me on Twitter. Can do zoom call to discuss.
What you want is a "scout file" an ancient solution i used in the backbone.js days.
Beta Was this translation helpful? Give feedback.