Replies: 1 comment
-
Moved over to issues #4970 |
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
-
Repro link
I have 2 entry points (main.js and entry2.js) and another file maths.js
Math.js has 3 exports
log
,square
andcube
.main.js imports
log
andcube
.entry2.js imports
log
andsquare
.Output generates a shared js which contains all 3 exports
log
,square
andcube
, even though onlylog
is shared between the entry modules.Is it possible to have one of these solutions?
log
remains in shared as its used by both entry modules, butcube
moves over to main.js andsquare
moves over to entry2.js.log
- All common code used by both entry pointscube
- Code used only by main,jssquare
- Code used only by entry2.jsSo I can combine them as required.
Our scenario:
We have 2 entry point in our application. One is for main thread and another is for worker thread.
After the code split we combine main + shared js for main thread and worker + shared for worker thread.
Currently this is causing unnecessary code in worker/main as shared js is not optimized.
Beta Was this translation helpful? Give feedback.
All reactions