4 Matching Annotations
- Nov 2020
I'd say it's better overall because it replaces paths at compile-time. It means there is no runtime dependency or any performance overhead.
Loaders use a mapping configuration to map module names to files at run-time, see RequireJs documentation and SystemJS documentation.
- Oct 2020
Doing so also means adding empty import statements to guarantee correct order of evaluation of modules (in ES modules, evaluation order is determined statically by the order of import declarations, whereas in CommonJS – and environments that simulate CommonJS by shipping a module loader, i.e. Browserify and Webpack – evaluation order is determined at runtime by the order in which require statements are encountered).
Here: dynamic loading (libraries/functions) meaning: at run time
This PR replaces nested require statements in files in vendor/postcss with import declarations, so that they can be properly resolved at build time.
- order is important / do things in the right order
- build time vs. run time
- ES modules
- annotation meta: may need new tag
- CommonJS modules
- dynamic loading (libraries/functions)