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

Add SASS support #362

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add SASS support #362

wants to merge 3 commits into from

Conversation

thefill
Copy link

@thefill thefill commented Jul 12, 2018

I have noticed .scss files are not supported in your fork - I have altered configs so css/scss files are compiled via webpack (no need for external sass compiler).

@Bogala
Copy link

Bogala commented Jul 13, 2018

It lacks a dependency to node-sass package.

@thefill
Copy link
Author

thefill commented Jul 13, 2018

@Bogala thanks a lot for pointing this out - will take a look at this.

@thefill
Copy link
Author

thefill commented Jul 13, 2018

@Bogala dependency added - one of the global packages must have fulfilled this dependency. Thanks again!

@Bogala Bogala mentioned this pull request Jul 13, 2018
@thefill
Copy link
Author

thefill commented Jul 13, 2018

@Bogala looks like travis-ci failure is due to to issue with "npm cache clean". Can we execute CI again?

@thefill
Copy link
Author

thefill commented Jul 13, 2018

Apparently npm cache clean should be run with --force. More about this issue here

@clakech
Copy link

clakech commented Jul 17, 2018

what about node-sass-chokidar ?

@thefill
Copy link
Author

thefill commented Jul 17, 2018

@clakech that is indeed a valid replacement - in fact, its recommended in "react-create-app" doc. Thanks

@Bogala
Copy link

Bogala commented Jul 17, 2018

@thefill it is an issue node-sass with npm5. Use node-sass-chokidar will surely allow to pass the CI job

@thefill
Copy link
Author

thefill commented Jul 17, 2018

@Bogala just done that! thanks @Bogala & @clakech for the assistance ;-)

@thefill
Copy link
Author

thefill commented Jul 20, 2018

Any chance to merge this pr ? ;-)

@clakech
Copy link

clakech commented Jul 21, 2018 via email

@DorianGrey
Copy link
Collaborator

This fork aims to maintain feature parity with CRA as far as this makes sense considering the technical circumstances - so, at first glance: No, it's favored to wait for CRA to provide this.

Yet ... there is support for scss/sass on the next branch, i.e. it will be released with V2.0, so I'd say it's valid to somewhat "pre-pick" this as long as matches their implementation as far as feasible.

Which means that there are two changes to take care of:

  • The pattern should match for both scss and sass files.
  • Remove the node-sass resp. node-sass-chokidar dependency. The latter doesn't have any use here anyway, since its watcher is not used anyway. Regarding node-sass, it seems to be favorable to let users install it in case they need this feature, esp. since it has a native dependency (libsass) - at least that was mentioned in some of the threads on CRA discussing sass support.

@kmturley kmturley mentioned this pull request Aug 23, 2018
@kmturley
Copy link

I forked this repo and added sass-loader support:
kmturley@896190a

I pushed to npm as:
https://www.npmjs.com/package/react-scripts-scss-ts

Which means you can start apps using:
npx create-react-app react-typescript-scss-new --scripts-version=react-scripts-scss-ts

@nickserv
Copy link

nickserv commented Sep 1, 2018

This is fixed in CRA 2.

@cyril-lakech
Copy link

now CRA2 is here, what are the plan to use CRA2/SASS/TypeScript ?

@johnrom
Copy link

johnrom commented Sep 28, 2018

Hi all,

I've created a fork merging @thefill 's changes with the latest create-react-app-typescript/master and changed the webpack configs to use the new CRA 2.0 method.

Unfortunately, either @thefill 's repository does not accept PRs or Github is bugging out, so if @thefill wants to PR my PR into his PR, that seems like the proper way to do this, otherwise I can PR this repository directly.

https://github.com/nimblelight/create-react-app-typescript/tree/thefill/master-2

@thefill
Copy link
Author

thefill commented Sep 28, 2018

Hey @johnrom its github's issue I'm afraid - have no restrictions from my side ;-/ best if you can PR it directly if you be so kind ;-)

btw I abandoned those scripts completely with all its complex webpack configs... for last few weeks my team is using parcel & all is sooooooo much faster / better / easier. If anybody fancy I can create a quick&dirty public repo with a sample setup.

@johnrom
Copy link

johnrom commented Oct 1, 2018

ok, then this PR can be closed, I'll make a reference from my PR to here for documentation purposes.

I think my team will stick with the create-react-app method, maybe we'll revisit Parcel after we've had to eject and our lives have become more complicated.

@johnrom johnrom mentioned this pull request Oct 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants