Closed Legends closed 3 years ago
I would also like to load the module this way! It would great if this project support ES6 imports.
I don't think you can use Webpack's dynamic imports to polyfill Promises into an environment that doesn't already have them because the Dynamic Import process itself relies on Promises.
I want to load the polyfill on demand, but it cannot find the module. I am using webpack! It works the way I described below, to load
lodash
for example, but it cannot find thees6-promise
module.I can see that the bundle is created:
In my code editor I get a red squiggle, it cannot find the module.
this doesn't work either:
import * as p from "es6-promise"
I don't want to
require
it, because then it gets bundeled with all other scripts. I just want to load the polyfill when needed.