You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this still mean multiple fully-independent webpacking work though, right?
Related to React SSR, I am webpacking a library of common UI components which is reusable/isomorphic in both the browser client-side environment and the node server-side environment. Aside from the chunking logic which is platform-specific, most of the script code should be executable in both environments - there are no native operations for these components.
For a very basic webpack project, the emitted differences between the targets of "web" vs "node", the "production" build changes seem trivial, minification aside:
[id].js/main.js:
runtime.js:
The "development" mode emits are bigger but also seem mostly identical.
Is there a major reason why these emits couldn't be unified for an isomorphic single bundle output that is executable in either browser or node environments, perhaps with certain restrictions or warnings about use of native dependencies?
If this goal is in reach, is it limited to a change in the SplitChunksPlugin? Where is the code for that?
The benefit would be a single build CPU load for both consumers of SSR UI code.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Does this still mean multiple fully-independent webpacking work though, right?
Related to React SSR, I am webpacking a library of common UI components which is reusable/isomorphic in both the browser client-side environment and the node server-side environment. Aside from the chunking logic which is platform-specific, most of the script code should be executable in both environments - there are no native operations for these components.
For a very basic webpack project, the emitted differences between the targets of "web" vs "node", the "production" build changes seem trivial, minification aside:
[id].js/main.js:
runtime.js:
The "development" mode emits are bigger but also seem mostly identical.
Is there a major reason why these emits couldn't be unified for an isomorphic single bundle output that is executable in either browser or node environments, perhaps with certain restrictions or warnings about use of native dependencies?
If this goal is in reach, is it limited to a change in the SplitChunksPlugin? Where is the code for that?
The benefit would be a single build CPU load for both consumers of SSR UI code.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions