X Tutup
The Wayback Machine - https://web.archive.org/web/20200626022113/https://github.com/tailwindcss/tailwindcss/issues/1525
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs]: add info about purgecss and what that tool do in installation docs #1525

Open
pumano opened this issue Apr 3, 2020 · 1 comment
Open

Comments

@pumano
Copy link

@pumano pumano commented Apr 3, 2020

Thanks for a great css library.

I spend 2 days for trying to understand why in my vue project leaflet.css file not loaded to my project in test environment while in dev it's OK.

Please add information warning to installation section about purgecss

Also will be good to add note how to add whitelist styles to purgecss

module.exports = {
  plugins: {
    tailwindcss: {},
    'vue-cli-plugin-tailwind/purgecss': {
      "whitelistPatterns": ["/^leaflet/"],
    }
  }
}

Also website not have info about how to install tailwindcss via vue CLI.

Thanks

@ifaniqbal
Copy link

@ifaniqbal ifaniqbal commented Jun 2, 2020

Thanks @pumano . This makes me aware of it.

In my project (latest Laravel 6, tailwind ^1.4, leaflet), I have to add these lines in webpack.mix.js:

if (mix.inProduction()) {
  mix.version()
    .purgeCss({
      whitelistPatterns: [/(leaflet[-a-z]*)/],
    })
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.
X Tutup