Skip to content

Stylus support with modules for create-react-app & craco

License

Notifications You must be signed in to change notification settings

naftis/craco-stylus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

craco-stylus

Stylus plugin for Craco. Allows using Stylus .styl files in create-react-app 3.0 and also works with TypeScript.

  • CSS Module imports: import styles from "./App.module.styl";
  • Global imports: import "./App.module.styl";

Getting started with create-react-app

$ create-react-app karate-app

$ cd karate-app

$ yarn add @craco/craco craco-stylus stylus stylus-loader

package.json

   "scripts": {
-    "start": "react-scripts start",
+    "start": "craco start",
-    "build": "react-scripts build",
+    "build": "craco build",
-    "test": "react-scripts test",
+    "test": "craco test",
-    "eject": "react-scripts eject"
+    "eject": "craco eject"
   },

craco.config.js

const CracoStylusPlugin = require("craco-stylus");

module.exports = {
  plugins: [
    {
      plugin: CracoStylusPlugin
    }
  ]
};

About

Stylus support with modules for create-react-app & craco

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published