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.
- ES modules
- build time vs. run time
- order is important / do things in the right order
- dynamic loading (libraries/functions)
- annotation meta: may need new tag
- CommonJS modules