1.2.0 • Published 2 years ago

craco-stylus v1.2.0

Weekly downloads
9
License
ISC
Repository
-
Last release
2 years ago

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
    }
  ]
};
1.2.0

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

4 years ago