Dynamic Import Support and Output Proper ES Modules

81 views
Skip to first unread message

Chad Killingsworth

unread,
May 7, 2021, 4:15:44 PM5/7/21
to Closure Compiler Discuss
As of the 20210505 release, the compiler has full support for dynamic imports even in advanced mode. Details here: https://github.com/google/closure-compiler/wiki/JS-Modules#dynamic-import-expressions

Also supported is an output type of ES Modules. This really impacts code splitting and makes that much easier if you can support only browsers with ES Module support (so pretty much everything if you no longer care about Internet Explorer).  See https://github.com/google/closure-compiler/wiki/Chunk-output-for-dynamic-loading for details.
Reply all
Reply to author
Forward
0 new messages