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

When using --uncssrc it always fails #468

Open
pamtbaau opened this issue Jan 4, 2022 · 1 comment
Open

When using --uncssrc it always fails #468

pamtbaau opened this issue Jan 4, 2022 · 1 comment

Comments

@pamtbaau
Copy link

pamtbaau commented Jan 4, 2022

When I use npx uncss -u uncss.json http://base-dev > ../css/style-uncssed.css, no matter the content of uncss.json a whole bunch of data is dumped and ../css/style-uncssed.css remains empty.

This is the tail of the dump:

          '@media (min-width: 576px) {\n' +
          '  .container-sm, .container {\n' +
          '    max-width: 540px;\n' +
          '  }\n' +
          '}\n' +
          '@media (min-width: 768px) {\n' +
          '  .co'... 197814 more characters,
        hasBOM: false,
        id: '<input css 1>'
      },
      end: { line: 64, column: 1 }
    },
    selector: ':root',
    lastEach: 1,
    indexes: {}
  }
}

Node.js v17.1.0

I've tried the following contents in uncss.json

{}

or

{
   "media": [
        "(max-width: 480px) and (orientation: landscape)"
    ]
}

or

{
    "media": [
        "(max-width: 480px)"
    ]
}

Whenever I run npx uncss -m "(max-width: 480px) and (orientation: landscape)" http://base-dev > ../css/style-uncssed.css, all goes well.

What am I missing?

@Cealtea
Copy link

Cealtea commented Jan 27, 2022

I have the same problem!

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