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.

Start/end ignore comments not detected when they don't precede a rule

See original GitHub issue

First of all, thank you so much for developing my feature request (#66). It works great in most cases, but I just found an issue with it. It seems the /*! purgecss start ignore */ comment is ignored if it’s the first line in the CSS file, so the block isn’t ignored. I’m using Laravel Mix with the laravel-mix-purgecss plugin. Let me know if you need any more information. Thank you!

Issue Analytics

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

github_iconTop GitHub Comments

43reactions
viperfx07commented, Nov 29, 2019

add ! after /*

These works on webpack 4

/*! purgecss start ignore */
/*! purgecss end ignore */

I read on cssnano docs on how to preserve the comments https://cssnano.co/optimisations/discardcomments/

11reactions
jaredlosoncommented, Jun 7, 2019

@Remeic Just ran into this. My issue was that cssnano was running before PurgeCSS and stripping out comments.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extensible Markup Language (XML) 1.0 (Fifth Edition) - W3C
[Definition: Markup takes the form of start-tags, end-tags, empty-element tags, entity references, character references, comments, CDATA section ...
Read more >
perl-best-practices - Perltidy - SourceForge
Execute perltidy on file somefile.pl, with 3 columns for each level of indentation (-i=3) instead of the default 4 columns. There will not...
Read more >
Update to the Regulations Implementing the Procedural ...
The Council on Environmental Quality (CEQ) issues this final rule to ... For example, CEQ has found that NEPA reviews for Federal Highway ......
Read more >
Regular Expressions :: Eloquent JavaScript
When using the RegExp constructor, the pattern is written as a normal string, so the usual rules apply for backslashes. The second notation,...
Read more >
Comments in Code - Visual Basic | Microsoft Learn
This symbol tells the Visual Basic compiler to ignore the text following it, ... Visual Basic does not enforce rules for adding comments....
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