webpack by Ciro Santilli 32 Updated Created
Webpack is like a magic hydra that can eat any type of file and bundle it into a single output: .js, .ts, .ccs, .scss, .jsx, .tsx, require, import, import css from .js, it doesn't matter at all, it just digests all into the same dump.
When it works, you are just left in awe and with a single Js file. When it doesn't, you're fucked and have to debug for several hours.
Demos under: webpack/. To run all of them by default:
cd webpack/min
npm install
npm run build
xdg-open index.html
To easily make changes and reload the .js output live let this run on a terminal:
npx webpack watch
Examples: