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.

parce@2.0.0-alpha.3.2 corrupts module styles when CSS files are edited

See original GitHub issue

I’m using PostCSS as suggested here with the following .postcssrc configuration:

{
  "modules": true,
  "plugins": {
  }
}

It seems that any time I edit a .css file, Parcel loses all of the styles defined in that module and I need to wipe out the .parcel-cache directory entirely and restart Parcel to fix it.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
KatSickcommented, Feb 27, 2020

I have the same issue when changing .module CSS file. I see an error in the console:

Uncaught SyntaxError: Unexpected token '.'
    at new Function (<anonymous>)
    at hmrApply (HMRRuntime.js:180)
    at HMRRuntime.js:60
    at Array.forEach (<anonymous>)
    at WebSocket.ws.onmessage (HMRRuntime.js:61)

And styles does not apply.

1reaction
bvaughncommented, Nov 24, 2019

Yeah, I think the two issues are separate 😁 Just mentioned the HMR one while I was here since I was also seeing it.

Still not sure how to make the first issue reproducible without just monkeying around a bit :frown: Sorry

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS
Enabling CSS modules globally occurred in your project's PostCSS config file. This plugin can now be removed from your PostCSS config if you...
Read more >
How do I exclude a css file from being included ...
So the question is: Can I exclude certain files from this "css module" processing? To enable Css Modules in parcel I added a...
Read more >
parcel_css - Rust
Parcel CSS is a CSS parser, transformer, and minifier based on the cssparser crate used in Firefox. It supports fully parsing all CSS...
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