npm, node.js Flashcards
How to automatically copy assets during/before build?
All assets of package must be copied to parent project.
In Angular usually it is done by assets
config inside angular.json, but better approach is to use npm-assets.
What is ECMA2015 module?
A module, in a nutshell, is a JavaScript file that operates in a sandbox environment and exposes some values to the public. It’s a normal JavaScript file with import statements to import modules and export statements to make a value (such as variable, function, class, etc.) available for import.
TypeScript supports the EcmaScript module syntax which means you will be using modules in TypeScript using import and export keyword which is very convenient.
what is module resolution?
Whether a relative path or non-relative path, when the TypeScript compiler encounters a import statement, it starts looking for a module file to import in the file system. The lookup process is called module resolution. Depending on the path of a module, relative or non-relative, the TypeScript compiler takes a different approach to look for the module file. This approach is called a module resolution strategy.