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
If you have a project with multiple targets, at least one of which has scope hoisting enabled, and another that does not, symbol propagation runs and can potentially break the non-scope hoisted targets. This is caused by #8432. cc. @mischnic
When scope hoisting is not enabled, imports are not rewritten so we cannot split them to point at each individual symbol.
import{Icon,UIIcon}from'icon';
If Icon and UIIcon actually are re-exports to different files, the dependency currently gets rewritten to point to one of them, and the other one ends up as undefined at runtime.
Since the non scope hoisting packager doesn't rewrite each individual symbol, we should probably disable this dependency rewriting for non scope hoisted bundles.
😯 Current Behavior
Symbol propagation rewrites dependencies, even when scope hoisting is disabled for a target.
🐛 bug report
If you have a project with multiple targets, at least one of which has scope hoisting enabled, and another that does not, symbol propagation runs and can potentially break the non-scope hoisted targets. This is caused by #8432. cc. @mischnic
🎛 Configuration (.babelrc, package.json, cli command)
Two targets:
🤔 Expected Behavior
When scope hoisting is not enabled, imports are not rewritten so we cannot split them to point at each individual symbol.
If
Icon
andUIIcon
actually are re-exports to different files, the dependency currently gets rewritten to point to one of them, and the other one ends up as undefined at runtime.Since the non scope hoisting packager doesn't rewrite each individual symbol, we should probably disable this dependency rewriting for non scope hoisted bundles.
😯 Current Behavior
Symbol propagation rewrites dependencies, even when scope hoisting is disabled for a target.
💻 Code Sample
https://github.com/devongovett/parcel-symbol-propagation-repro
🌍 Your Environment
The text was updated successfully, but these errors were encountered: