k2snowman69 / bug-css-tree-shaking

Webpack has a treeshaking bug with css-loader where styles are being dropped

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSS tree shaking tester

The goal of this repository is to allow you to understand what will happen to your imports in various different scenarios.

The inputs you change are:

  • package.json - sideEffects
  • webpack.config.js - sideEffects for js and css

The outputs you are monitoring is ./dist/main.css

Depending on how you change the sideEffects, you'll see different files get included in the final build or not.

Build

npm i && npm run build

About

Webpack has a treeshaking bug with css-loader where styles are being dropped


Languages

Language:JavaScript 87.8%Language:CSS 7.9%Language:HTML 4.3%