webpack - Firescar96/lit GitHub Wiki
A detailed description of how webpack works and how to write a config is outside the scope of this wiki, but the following resources may be helpful:
It's important to note that a feature of webpack is recursive file loading. Even though only main.js is included in the webpack config as the entry point, all the files in the js folder eventually get bundled as they are ultimately imported by main.js. The entry to Lit-BAMF is main.js so this is the first file that's loaded when a user opens Lit-BAMF. Depending on the url path the user is redirected to the appropriate page. Unless they specifically request the Legacy or Channels page, they are by default sent to the Overview page.
Lit-BAMF uses webpack for building JavaScript and Sass files. Additionally there are two ways to run webpack to speed up development.
webpack will build and minimize files and place them into the local public folder. It is recommended you do this before making a git commit.
when the NODE_ENV environment variable is set to debug webpack will build files and place them directly in the '$HOME/.lit/litbamf' data directory. These files will also not be minimized to make debugging easier. Additionally when webpack or webpack --watch is first run (not on rebuilds!) it will initialize the data directory by copying the entire public folder over. This is useful for updating images or the index.html file.
It is recommended to run the command NODE_ENV=debug webpack --watch to automatically rebuild files when they change and place them in the production directory.