webpack-common-shake icon indicating copy to clipboard operation
webpack-common-shake copied to clipboard

Support dynamic import using stable syntax

Open RReverser opened this issue 8 years ago • 2 comments

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.

RReverser avatar Jul 12 '17 12:07 RReverser

import() is stage 3 and just pending 2 implementations finishing rollout. What is unstable about it?

bmeck avatar Jul 13 '17 16:07 bmeck

@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.

RReverser avatar Jul 13 '17 19:07 RReverser