0.1.3 • Published 4 years ago

react-app-rewire-scss-loaders v0.1.3

Weekly downloads
14
License
MIT
Repository
github
Last release
4 years ago

Add scss loaders to create-react-app

If you want to add more scss webpack loaders into your create react app without the need of ejecting in react, then Rewire your app and install this package that can include that extra loader for you.

Install

yarn add react-app-rewired react-app-rewire-scss-loaders -D
npm install react-app-rewired react-app-rewire-scss-loaders --save-dev

Add it to your project

Firstly Rewire your app then create/modify your config-overrides.js

Secondly (as example) if you want to share global scss variables across your project without importing files then try this example sass-resources-loader.

/* config-overrides.js */

const addRewireScssLoader = require("react-app-rewire-scss-loaders");

module.exports = function override(config, env) {
    
  config = addRewireScssLoader("sass-resources-loader", {
    resources: path.resolve(__dirname, "variables.scss"),
  })(config, env);

  return config;
};
0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago