Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

Sass support as in create-react-app >=2.0 #415

Closed
Meyhem opened this issue Oct 4, 2018 · 5 comments
Closed

Sass support as in create-react-app >=2.0 #415

Meyhem opened this issue Oct 4, 2018 · 5 comments

Comments

@Meyhem
Copy link

Meyhem commented Oct 4, 2018

Is this a bug report?

Yes

Can you also reproduce the problem with npm 4.x?

Not tried

npm -v
6.1.0

Which terms did you search for in User Guide?

sass / scss

Environment

npm ls react-scripts-ts
react-tstemplate@0.1.0 C:<omitted>
`-- react-scripts-ts@2.17.0

node -v
v10.2.1

yarn --version
1.7.0

OS: Windows

Steps to Reproduce

  1. yarn create react-app --scripts-version=react-scripts-ts
  2. yarn add node-sass # (as per official docs https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#adding-a-sass-stylesheet)
  3. create some .scss stylesheet
  4. import it into component
  5. No error while importing, but stylesheet has no effect

Expected Behavior

react-scripts-ts should behave same as react-scripts (version >=2.0) and correctly import .scss / .sass files

Actual Behavior

Sass files have no effect

Reproducible Demo

https://github.com/Meyhem/react-scripts-ts-scss-bug-demo

@wmonk
Copy link
Owner

wmonk commented Oct 4, 2018

#409

@wmonk wmonk closed this as completed Oct 4, 2018
@Meyhem
Copy link
Author

Meyhem commented Oct 4, 2018

Tried with yarn create react-app --scripts-version=react-scripts-ts@4.0.8 and Sass is working like a charm. Thanks!

@StJohn3D
Copy link

StJohn3D commented Oct 4, 2018

I already created an app, so I just upgraded my package.json to have "react-scripts-ts": "4.0.8" and it's working now. Except that npm start now launches the browser before it's finished compiling and I have to manually refresh the browser once compilation has completed. Is there a way to stop it from launching the browser automatically in npm-start, or at least fix it so the browser actually refreshes once compilation is complete?

@elektronik2k5
Copy link

@StJohn3D adding a BROWSER=none environment variable (in any supported way) should do the trick.

@StJohn3D
Copy link

StJohn3D commented Oct 8, 2018

@elektronik2k5 Thanks for that, good stuff to know. Fortunately it started working again last night so for now I'll just leave well-enough alone.

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

No branches or pull requests

4 participants