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

It hangs, do I call it wrong? #139

Open
kasperkamperman opened this issue Mar 30, 2024 · 2 comments
Open

It hangs, do I call it wrong? #139

kasperkamperman opened this issue Mar 30, 2024 · 2 comments

Comments

@kasperkamperman
Copy link

I'm trying to process bulma.css (v1.00, 636 Kb).

It hangs. Maybe there is an issue with my postcss.config.js? Do I need to use this plugin in a different way?
(Other plugins work fine calling like this).

const varRemove = require('postcss-css-variables')

module.exports = {
    plugins: [
        varRemove() // remove css variables
    ],
};

I also found the online tool, but copy-pasting this big file also hangs the browser.

I have fast M2 system, so I think it relates to the plugin or my use of it.

@kasperkamperman
Copy link
Author

I could pinpoint that it hangs while processing at this point:

resolveDecl(
              decl,
              map,
              opts.preserve,
              opts.preserveAtRulesOrder,
              logResolveValueResult
            );`

@oliwarner
Copy link

oliwarner commented May 2, 2024

Same boat. Bulma v1 is a real pig with variables. I've just seen your thread on Bulma.

With PostCSS's new variables option (which kicks out unused vars) and postcss-variable-compress, I'm down to 20KB/6KB but that dosen't seem to help the runtime performance of postcss-css-variables.

module.exports = {
    plugins: [
        require('@fullhuman/postcss-purgecss')({
            content:  [
                // ...
            ],
            variables: true,
        }),
        require('postcss-variable-compress'),
        require("postcss-css-variables"),
    ],
}

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

No branches or pull requests

2 participants