Testing an ideal build setup
This setup (illustrated by the webpack-desired.config.coffee) tries to configure a build system that satisfies the following criteria:
- Entry files are automatically detected as the
jsorcoffeefiles located directly under the scripts folder. Adding a new entry is as easy as adding a new file. That's it! - There is a special entry file, named
vendor, that is a special case. Any vendored assets can be required here without affecting the building of any of the other bundles. (This is good, since it's usually these that slow down builds) - A
common.jsis created whenever there is two or more (not includingvendor) entries that share some of the same modules. - Vendored assets should not affect the build time of the other entries.
- Required CSS assets should be fast, and not affect the build time of the JS assets.
To see the issue, do the following:
- Clone the repo
- Run
npm run expectedand make a change to theapp/scripts/material-expected.coffee - Notice the compile times both for initial build an the incremental build
- Run
npm run desiredand make a change to theapp/scripts/material-expected.coffee - Notice the compile times both for initial build an the incremental build
The desired config is a fully loaded config trying to fullfill the goals mentioned above.
The expected config is a gimped config designed to show the expected performance.
- Why is the sass build so slow?!
- Why does the vendor entry affect the the other entries? Adding seconds to their build times. What I really need is to be able to iterate quickly, with the performance seen when just building the main entry by itself.