Giter Club home page Giter Club logo

vite-mpa-tailwind-css-bundle-size's Introduction

vite-mpa-tailwind-css-bundle-size

$ npm run build

> [email protected] build
> vite build

vite v2.5.0 building for production...
transforming (17) node_modules/react/cjs/react.production.min.js
warn - You have enabled the JIT engine which is currently in preview.
warn - Preview features are not covered by semver, may introduce breaking changes, and can change at any time.
โœ“ 29 modules transformed.
dist/app1/index.html                             0.45 KiB
dist/app2/index.html                             0.45 KiB
dist/assets/modulepreload-polyfill.b7f2da20.js   0.69 KiB / brotli: 0.32 KiB
dist/assets/app2.de9c9aef.js                     0.84 KiB / brotli: 0.38 KiB
dist/assets/app1.1540d493.js                     3.51 KiB / brotli: 1.08 KiB
dist/assets/app2.74ba676f.css                    8.40 KiB / brotli: 2.14 KiB
dist/assets/app1.e7a3cdc9.css                    8.40 KiB / brotli: 2.13 KiB
dist/assets/vendor.3d9c5d49.js                   127.59 KiB / brotli: 36.08 KiB

As shown above, app1.css and app2.css have the same size.

Even though app2 only have a few class usage...๐Ÿ˜ข

As a work-around, you need to overwrite bundled assets by Vite like this to optimize.

NODE_ENV=production ./node_modules/.bin/tailwindcss -i ./app2/style.css -o ./dist/assets/app2.74ba676f.css --minify --purge ./app2/**/*.jsx

vite-mpa-tailwind-css-bundle-size's People

Contributors

leaysgur avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.