codesandbox / codesandbox-client

An online IDE for rapid web development
https://codesandbox.io
Other
12.96k stars 2.26k forks source link

parcel + postcss #1030

Closed gary149 closed 3 years ago

gary149 commented 5 years ago

Is there any way to use parcel with a postcss.config.js file (https://parceljs.org/transforms.html) in codesandbox ? It's seems the answer is no because the postcss config file is not recognized by codesandbox, am i missing something ?

CompuIves commented 5 years ago

Yep, that's right. We only use postcss for autoprefixer currently, but don't have something for custom plugins. This would be a good enhancement to add.

cmnstmntmn commented 5 years ago

@CompuIves so a configuration like

.postcssrc

{
  "modules": false,
  "plugins": {
    "postcss-css-variables": {},  
    "postcss-custom-media": {},
    "postcss-import": {},   
    "css-mqpacker":  true,  
    "perfectionist": true,      
    "autoprefixer": {
      "grid": false,
      "browsers": ["last 5 versions", "> 5%", "ie >= 11"]
    }
  }
}

won't work, right?

adamwathan commented 5 years ago

Noticed custom PostCSS plugin configuration works with the Nuxt preset:

https://codesandbox.io/s/w263lk042l

...but can't get it to work anywhere else. Trying to understand what's supported and what's not 🤔

lbogdan commented 5 years ago

Hey @adamwathan , I don't know if you're aware, but the nuxt template is actually a server / container sandbox template, which means it's like your local development environment, only running in a container in "the cloud". The majority of templates (the "Client Templates" from https://codesandbox.io/s/ ) are running directly in the browser, with the default configuration of their respective frameworks, which don't include PostCSS (+ plugins), as far as I know.

adamwathan commented 5 years ago

@lbogdan Ah that makes a lot of sense, thanks for clearing that up!

pspeter3 commented 5 years ago

Is this still true?

qfox commented 4 years ago

Is this still true?

Feels like ;-(

equinusocio commented 4 years ago

Please vote the main comment because Parcel supports Postcss by default everywhere but not here. It looks like a bug, not an improvement.

CompuIves commented 4 years ago

@equinusocio Do you have a reproducable sandbox I can use while implementing this?

equinusocio commented 4 years ago

@CompuIves Yes, here the basic Vanilla Parcel sandbox with a postcss js config: https://codesandbox.io/s/parcel-postcss-dmd9w?file=/src/styles.css

Additional info:

equinusocio commented 4 years ago

@CompuIves Do you need more info? Is the sandbox sent ok?

equinusocio commented 4 years ago

@CompuIves Have you all the info?

github-actions[bot] commented 3 years ago

This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed.

equinusocio commented 3 years ago

Hey, bot, mind your business.

github-actions[bot] commented 3 years ago

This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed.

equinusocio commented 3 years ago

Hey, bot, mind your business.

github-actions[bot] commented 3 years ago

This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed.

github-actions[bot] commented 3 years ago

This issue has been automatically closed because there wasn't any activity after the previous notice or the stale label wasn't removed.

s4l4x commented 2 years ago

Would love to use postcss-nesting in codesandbox please 🥺

JamesACS commented 2 years ago

@s4l4x - Added it to our feature request board!

andrew-dotson commented 1 year ago

@s4l4x - Added it to our feature request board!

Any update on this? This feature is def needed...