create-react-app icon indicating copy to clipboard operation
create-react-app copied to clipboard

adding more libraries to existing codebase without ejecting?

Open anilreddykatta opened this issue 9 years ago • 2 comments

I really love this project, great way to kick start very quickly.

To add SASS or any other libraries, currently, I am ejecting and customizing my configs. How do you feel about abstracting this? I am not sure whether this is good or bad idea. Curious to know community opinion.

When anyone wants to add sass to create react app, doing something like create-react-app --add sass should create a config with sass support. Anybody writing libraries should be able to add basic config how they interface with create-react-app which should be the starting point for interfacing with this awesome project.

{
 loader: {
  test: '*.scss',
  loader: ['sass-loader']
 }
}

Something like this?

anilreddykatta avatar Apr 10 '17 03:04 anilreddykatta

We provide docs for integrating with Sass and do not plan to add an ability to extend webpack configuration.

You can checkout (though not officially endorsed) https://github.com/timarney/react-app-rewired which lets you make these sorts of modifications.

This has been extensively discussed on many previous issues, sorry (feel free to search for them)!

Timer avatar Apr 10 '17 03:04 Timer

If you'd like, you can help discuss plugins in https://github.com/facebookincubator/create-react-app/issues/670.

Timer avatar Apr 10 '17 04:04 Timer