webpack-common-shake
webpack-common-shake copied to clipboard
Support dynamic import using stable syntax
import for dynamic imports is currently not stable, and so many codebases still use the old one for code splitting, namely AMD-style require:
require(['static-dep-A', 'static-dep-B'], function (staticDepA, staticDepB) {
...
});
Currently all these cases cause webpack-common-shake to bail out even though they're likely optimizable in the same way.
import() is stage 3 and just pending 2 implementations finishing rollout. What is unstable about it?
@bmeck Stage 3 is, not every codebase is using transpilers and edge features. I don't want to dig into that discussion, just explained why some codebases aren't migrated yet while could benefit from this plugin.