question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Do not parse CSS on missed plugins or parser/stringifier option

See original GitHub issue

Right now we are showing warning:

You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.

https://github.com/postcss/postcss/blob/main/lib/processor.js#L19

But many people complain that they can fix it since PostCSS is used wrongly somewhere inside build pipeline.

We can avoid warning if PostCSS will not parse CSS in this case. We can add something like NoWorkResult, where NoWorkResult#css key will be equal to input. On NoWorkResult#root read we still need to parse CSS. And we need to find the best way to deal with NoWorkResult#map.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
aicommented, Nov 1, 2021

If we want to create an actual source map we need still to parse AST because it adds mappings on nodes

If there are no changes between input and output, you can add only a single map mapping from the whole file to the whole file.

You do not need to create mapping per each CSS part if there are no changes.

0reactions
bogdan0083commented, Nov 1, 2021

If we want to create an actual source map we need still to parse AST because it adds mappings on nodes

If there are no changes between input and output, you can add only a single map mapping from the whole file to the whole file.

You do not need to create mapping per each CSS part if there are no changes.

Got it, thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Suppress no plugins warning · Issue #1218 · postcss ... - GitHub
I considered that, but postcss.parse(css) won't make use of the other processor options, like syntax , parser , map , etc ...
Read more >
jest trying to parse .css - Stack Overflow
The best solution is to use a moduleNameMapper line in your Jest config, as described in the Jest docs. A minimal "ignore css"...
Read more >
css-loader | webpack - JS.ORG
If set to false , css-loader will not parse any paths specified in url or image-set . A function can also be passed...
Read more >
Broke my site - WordPress.org
Hello, ever since I have installed your plugin my site is broken! I tried uninstalling it, deactivating it, clearing the cache from ftp,...
Read more >
Theme is missing the style.css stylesheet error
A common issue that can occur when installing a WordPress themes is “The package could not be installed. The theme is missing the......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found