Parcel: CSS is not transformed according to postcss-preset-env and browserslist rules

Created on 4 Sep 2018  路  6Comments  路  Source: parcel-bundler/parcel

馃悰 bug report

馃帥 Configuration (.babelrc, package.json, cli command)

postcss.config.js

module.exports = {
  plugins: [
    require('postcss-normalize'),
    require('postcss-import'),
    require('postcss-preset-env')({
      stage: 0
    })
  ]
};

I made a github example project : https://github.com/padupuy/parcel-playground

馃 Expected Behavior

The CSS should by transformed according to postcss-preset-env and browserslist rules. (playground here https://preset-env.cssdb.org/playground)

馃槸 Current Behavior

On mac OS there are several bugs

On dev mode :

  • the custom variables are not converted as there are on https://preset-env.cssdb.org/playground
  • the custom variables are duplicated
  • the style defined in the @custom-media queries is deleted instead of been "transpiled"

On build mode :

  • the custom variables are no more duplicated but the other issues still occur

馃拋 Possible Solution

馃敠 Context

馃捇 Code Sample

I made a github example project : https://github.com/padupuy/parcel-playground

馃實 Your Environment

| Software | Version(s) |
| ---------------- | ---------- |
| Parcel | 1.9.7|
| Node |9.11.2|
| Yarn |1.7.0|
| Operating System | Mac OS High Sierra 10.13.5|

Bug CSS Preprocessing Stale

Most helpful comment

Any news? I'm currently running into the same issue :-(

All 6 comments

@DeMoorJasper I update my example with the latest dependencies, the bug is still there but when I edit a CSS file the result is good. Build mode is still KO.

So we have :

  • Watch mode : KO
  • Watch mode after a change : OK
  • Build mode : KO

Hope it helps

Any news? I'm currently running into the same issue :-(

Any news?

Is there any workaround to this issue?

I was having this same issue and ended up here. After a bit of testing, it turns out one of my postcss plugins was not in my package.json file. Parcel did not display any errors about this, it just failed silently. Adding the plugin to package.json and then installing it worked for me, now it is transforming. Maybe this will work for you.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

Was this page helpful?
0 / 5 - 0 ratings