Open Razzwan opened 3 years ago
Also you can use the new JavaScript 2020 native dynamic import with await
, something like this:
let module = await import('/modules/my-module.js');
This can be written inside an if
statement.
Hey @Razzwan, I'm assuming you're referring to these two usages: https://github.com/dOrgTech/DAOcreator/blob/09db2fdb239c69f8c12ad58fd0a84c3789335484/packages/lib/src/dependency/arc/src/migrate-dao.js#L703 and https://github.com/dOrgTech/DAOcreator/blob/09db2fdb239c69f8c12ad58fd0a84c3789335484/packages/lib/src/dependency/arc/src/utils.js#L21-L28
Both of these source files come from this repo: https://github.com/daostack/migration
They're copied into the DAOcreator here: https://github.com/dOrgTech/DAOcreator/blob/master/packages/lib/scripts/prepArc.js
The reason this manual copying is done is to:
If you'd like this code changed, I'd suggest making an issue here: https://github.com/daostack/migration
ok. will try to update migration https://github.com/daostack/migration/issues/373
Instead of such syntax:
Please, use such one:
Or with dynamic imports: