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.

Failed to detect when using multi-line classes with CRLF

See original GitHub issue

Apologies for writing here, this may be partly an issue or it may be misunderstanding. Building my app for production today and a seemingly random selection of styles weren’t compiling through. Everything works fine using npm run dev but breaks using ‘npm run build’. Adding the missing styles to safelist has fixed things, but I’m left confused as to what needs does and does not need adding and why.

Here’s a snippet:

<div class="absolute z-20 top-1/3 w-full rounded-xl border-t-10 bg-light-blue-50
  border-light-blue-200 dark:bg-gray-700 dark:border-gray-500 -mx-1 md:-mx-2">
  ...
</div>

In dev mode, everything works, but in production the following styles don’t compile through: top-1/3 border-t-10 border-light-blue-200 rounded-xl -mx-1 md:-mx-2. So I add all these to safelist and everything works.

What’s confusing especially is why border-light-blue-200 doesn’t work, also dark:border-gray-500 doesn’t work unless border-light-blue-200 is in safelist. Also rounded-xl, the negative -mx-1, and why md:-mx-2 needs to be prefixed by the screen breakpoint.

On a more general note it seems fairly arbitrary what works and what doesn’t and having to add everything to safelist doesn’t really seem like a good approach. Or I’m totally confused, help please!

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
antfucommented, May 1, 2021

@qgates can you verify if it still occur in 0.15.10? Thanks

1reaction
qgatescommented, May 1, 2021

@antfu 0.15.10 has fixed the issue, nice and fast again with updates in dev mode. Also tested with production build for the original issue and everything is correct. Many thanks 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why doesn't $ in .NET multiline regular expressions match ...
If you specify the RegexOptions.Multiline option, it matches either the newline character (\n) or the end of the input string. It does not, ......
Read more >
SP Designer 2010 -- Send Multi-Line Text Field on one line in ...
Using SP Designer 2010, I am attempting to have a Multi-Line text field (plain text) be concatenated into a single line with single-space ......
Read more >
Multiline mode of anchors ^ $, flag "m"
“End of a line” formally means “immediately before a line break”: the test $ in multiline mode matches at all positions succeeded by...
Read more >
Retaining Line Breaks In Multi-Line Text Fields From Forms Pro
How can we prevent line breaks from being stripped out of multi-line text fields populated in a Forms Pro survey response?
Read more >
Break title into multiple lines? - MATLAB Answers - MathWorks
When I am adding a title to a graph, is there a way to break the title into multiple lines if it is...
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