2.0.3 • Published 9 months ago

styled-jsx-dart-sass v2.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

styled-jsx-dart-sass

This is a fork of https://github.com/giuseppeg/styled-jsx-plugin-sass

Difference:

  • this package uses dart-sass instead of node-sass

Usage

Install the package first.

npm install --save-dev styled-jsx-dart-sass

Install the sass version you need (it is a peer dependency).

npm install --save-dev sass

Next, add styled-jsx-dart-sass to the styled-jsx's plugins in your babel configuration:

{
	"plugins": [["styled-jsx/babel", { "plugins": ["styled-jsx-dart-sass"] }]]
}

Sass options

Sass can be configured using sassOptions. This is useful for setting options such as includePaths or precision.

{
	"plugins": [
		[
			"styled-jsx/babel",
			{
				"plugins": [
					[
						"styled-jsx-dart-sass",
						{
							"sassOptions": {
								"includePaths": ["./styles"],
								"precision": 2
							}
						}
					]
				]
			}
		]
	]
}
2.0.3

9 months ago