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
Following content maybe somehow out of context. This PR's final implementation is to resolve #17986.
A new external type has been introduced, mainly for the purpose of output clean artifact during bundling library. The name of this "module-import" is referenced from webpack/webpack#17986 (comment), but I'm not sure if the current implementation fully meets the intention of this comment. This PR is an incomplete implementation, only implementing the handling of external processing for dynamic imports.
There is a slightly hacky bit here, where we're deleting ImportDependency at finishModules stage to prevent any runtime code from being generated. But I couldn't find a better way to prevent ImportDependencyTemplate from modifying the runtime code. Possibly by introducing a new DependencyLibraryTemplate specifically for library patterns could achieve that. Do you have any suggestions on how to suppress runtime code generation? @alexander-akait
Did you add tests for your changes?
Yes.
Does this PR introduce a breaking change?
No.
What needs to be documented once your changes are merged?
The PR is still in draft mode, it should add update the document before merged.
The text was updated successfully, but these errors were encountered:
A pull request by @fi3ework was merged and maintainers requested a documentation change.
See pull request: webpack/webpack#18620
What kind of change does this PR introduce?
Resolve #17986.
Documentation update: #7345.
Following content maybe somehow out of context. This PR's final implementation is to resolve #17986.
A new external type has been introduced, mainly for the purpose of output clean artifact during bundling library. The name of this
"module-import"
is referenced from webpack/webpack#17986 (comment), but I'm not sure if the current implementation fully meets the intention of this comment. This PR is an incomplete implementation, only implementing the handling of external processing for dynamic imports.Here's what it does:
Given following config:
source
output
There is a slightly hacky bit here, where we're deleting
ImportDependency
atfinishModules
stage to prevent any runtime code from being generated. But I couldn't find a better way to preventImportDependencyTemplate
from modifying the runtime code. Possibly by introducing a newDependencyLibraryTemplate
specifically for library patterns could achieve that. Do you have any suggestions on how to suppress runtime code generation? @alexander-akaitDid you add tests for your changes?
Yes.
Does this PR introduce a breaking change?
No.
What needs to be documented once your changes are merged?
The PR is still in draft mode, it should add update the document before merged.
The text was updated successfully, but these errors were encountered: