Ensuring statelessness

Make sure the loader does not retain a state between module transformations. Each run should always be independent of other compiled modules.

During the compilation process, you may end up running several builds as you fine-tune your bundle, and you don't want to correct each run, but rather retain each build in its original state. 

This will make things much easier to keep track of should things go wrong, as you can always start again with the source files without starting at the very beginning of your command-line session.

It is also important to consider compatibility with other loaders. As this is a convention among loaders, you should maintain that same convention unless it is fundamentally necessary for your loader to perform its specific task, and, if so, this should be made clear to the developer so that no mistakes are made.

If the passing of a state is necessary for the functionality of your loader, then there is a convenient solution to provide adherence to conventions: the loader utilities package.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.156.250