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
{{ message }}
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
it's not clear to me why we hardcode these paths. ideally we should follow the "module" property to see where the code is in the package, or even better we should check the new "sideEffects" property introduced by webpack v4.
It seems that we are intentionally excluding the es2015 distribution from these optimizations. I'm not sure why, but regardless of the reason, relying on paths is not the right way to go about this - we should be consulting the package.json and using the same resolution algorithm (or the reversed version of it) to understand what kind of file we are dealing with.
Bug Report or Feature Request (mark with an
x)Area
Versions
Repro steps
the following line hardcodes "esm5" path - which is an implementation detail and not part of the public api:
devkit/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts
Line 44 in 40c5eeb
this line then uses the path above to test if build-optimizer optimizations should be enabled:
devkit/packages/angular_devkit/build_optimizer/src/build-optimizer/build-optimizer.ts
Line 59 in 40c5eeb
Desired functionality
it's not clear to me why we hardcode these paths. ideally we should follow the "module" property to see where the code is in the package, or even better we should check the new "sideEffects" property introduced by webpack v4.
It seems that we are intentionally excluding the es2015 distribution from these optimizations. I'm not sure why, but regardless of the reason, relying on paths is not the right way to go about this - we should be consulting the package.json and using the same resolution algorithm (or the reversed version of it) to understand what kind of file we are dealing with.
Mention any other details that might be useful