Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

builded css file 3MB #23

Open
fbeqirllari opened this issue Oct 22, 2021 · 1 comment
Open

builded css file 3MB #23

fbeqirllari opened this issue Oct 22, 2021 · 1 comment

Comments

@fbeqirllari
Copy link

No description provided.

@schmanat
Copy link

Hi @bucibucii

I don't know whats your problem realy is, so I can only guess whats going on. The default tailwind.config.js purges all files stored in die /src/ folder and only *.js files. So if you are using another extension like jsx the nothing will be purged an you have the whole Tailwind CSS (and its about 3MB).

Since Tailwind v2 they also use the JIT module. I'm also working with JIT and its works great. If you want to use it, you habe only to enable it in the tailwind.config.js with mode: 'jit':

module.exports = {
  mode: 'jit'
  purge: ['./src/**/*.js'],
  darkMode: false, // or 'media' or 'class'
  theme: {
    extend: {},
  },
  variants: {
    extend: {},
  },
  plugins: [],
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants