kitze / custom-react-scripts

[DEPRECATED, use customize-cra] Allow custom config for create-react-app without ejecting
https://custom-react-scripts.netlify.com
MIT License
991 stars 96 forks source link

Question: Webpack configuration for the loaders #66

Closed alexsinfarosa closed 7 years ago

alexsinfarosa commented 7 years ago

Hi,

I am trying to use grommet in custom-react-scripts. On their site they suggest to modify the Webpack configuration for the loaders as the following:

module: {
  loaders: [
    {
      test: /\.js/,
      exclude: /node_modules/,
      loaders: ['babel']
    },
    {
     test: /\.scss$/,
     loader: 'style!css!sass?outputStyle=compressed'
    }
  ]
},
sassLoader: {
  includePaths: [
    './node_modules',
    // this is required only for NPM < 3.
    // Dependencies are flat in NPM 3+ so pointing to
    // the internal grommet/node_modules folder is not needed
    './node_modules/grommet/node_modules'
  ]
}

How do I do that?

Thanks!

TheTFo commented 7 years ago

You'll need to eject for this, that will get you your webpack config accessible.

Word of warning, this irreversible.

kitze commented 7 years ago

Hey @alexsinfarosa, this project won't include custom webpack configs, sorry.

Good luck!