Ciro Santilli's open source contributions Open source Updated 2025-07-16
webpack/template Updated 2025-07-16
../webpack/template contains a reasonable starter template.
This will produce, under
dist/ the following minimized files:dist/index.html: from ../webpack/template/index.html. You can open it to see:show on the browser. This was added from JavaScript.Hello webpackdist/index.js: from ../webpack/template/index.js and anything in its import tree, e.g.:- ../webpack/template/main.scss: sass source. It gets embedded the the JavaScript output as a string, and the JavaScript then applies it to the page, making the font blue
lodashthird party library
You can also run this test with the development server on localhost:9000:which uses unminimized outptus, and automatically push reloads the page whenever you change any of the input files!
npm start webpack Sass import Updated 2025-07-16
This shows how to produce a minimized fully embedded CSS file with webpack from a sass:That example produces a
cd webpack/sass
npm install
npm run build
xdg-open index.htmldist/main.css file which is a compresesd combination of:- webpack/sass/main.scss
- normalize.css, added to the project as a regular
node_modulespackage