Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCSS support #75

Closed
manuschiller opened this issue Jul 22, 2017 · 17 comments
Closed

SCSS support #75

manuschiller opened this issue Jul 22, 2017 · 17 comments

Comments

@manuschiller
Copy link

Hi!
Is it possible to include .scss files in the codesandbox-client and import the styles to our jsx files?

@CompuIves
Copy link
Member

Hey!

Yep, it's not released yet, but I'll work on this in the coming month. This comes with support for other frameworks.

@andrerpena
Copy link

Is it released?

@CompuIves
Copy link
Member

It's released for preact and vue. Not yet for React, because we need to find a way to export and detect an ejected CRA for it to work.

@andrerpena
Copy link

@CompuIves. Thank you for your response.

I'm releasing a new version of https://github.com/andrerpena/react-mde and I'd like the demos to be moved to CodeSandBox. I've never used Preact. Would components implemented for React work on Preact? I suppose not.

@chakrihacker
Copy link
Contributor

chakrihacker commented Nov 14, 2017

@andrerpena with preact-compat react components work fine in preact, and fortunately codesandbox comes with preact-compat so it works seamlessly. check preact-compat here. your react-mde is nice by the way 😄

@bram-l
Copy link

bram-l commented Dec 2, 2017

It seems like sass support in the preact-cli template is not working as expected. A small change in the default style shows that the scss is not transpiled into css: https://codesandbox.io/s/m3m6vl05rj

Changing the same stylesheet to sass syntax actually throws an error: https://codesandbox.io/s/8z8q40ok1l

@crazyyi
Copy link

crazyyi commented Dec 9, 2017

When will this be implemented? Anything I can do to contribute to this project?

@aprather51
Copy link

Maybe Codesandbox.io could try use ParcelJS Template too. Connecting SCSS is lot easier.

@CompuIves
Copy link
Member

We can close this one now 😄. We have parcel support!

@RavenHursT
Copy link

@CompuIves why was this closed?

import './styles.css'
works in my react apps that I roll on CodeSandbox.io

But...
import './styles.scss' still doesn't do anything. Not even throwing an error...

@CompuIves
Copy link
Member

CompuIves commented Mar 13, 2018

The React template in CodeSandbox is based on create-react-app, which doesn't support SCSS, but will probably have it in v2 (facebook/create-react-app#3815). If you'd download the sandbox and run it locally with CRA it would fail to load.

You can, however, start a sandbox based on parcel and use React with that, here's an example sandbox: https://codesandbox.io/s/rjj38yzm14.

@RavenHursT
Copy link

Awesome. Thanks for the explaination!

@vladinator1000
Copy link

Is there a way to not have to reload the page to see changes?

@johncokos
Copy link

Given that create-react-app has a workaround for this ... is there a way to get this working via the suggested workaround until version 2 is released?

https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-css-preprocessor-sass-less-etc

I did attempt this locally and it of course works, but not in a sandbox. Are you not running the npm start script to fire the sandboxes?

@jayarjo
Copy link

jayarjo commented Mar 11, 2019

So still no go ha?

@danieldanielecki
Copy link

Anyone knows if/when it'll be doable inside CodeSandbox for static templates?

@SaraVieira
Copy link
Contributor

Hey!

Our static template doesn't do any bundling so it's sadly not possible unless you use something like this: https://github.com/medialize/sass.js/blob/master/docs/getting-started.md

Sorry :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests