Dynamic import support in acorn
For more information, check out the proposal repo.
You can use this module directly in order to get Acorn instance with plugin installed:
;// or...const acorn = default;
Or you can use
inject.js for injecting plugin into your own version of Acorn like this:
const acorn = ;
Then, use the
plugins option whenever you need to support dynamicImport while parsing:
const ast = acorn;
To use the updated walk functionality the process is similar. You can require the default implementation as:
;// or...const dynamicImportWalk = default;
Or you can use the injectable version for injecting the new walk functionality into your own version of Acorn like this:
;;const walk = ;
This plugin is issued under the MIT license.