Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-react-scoped-css

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-react-scoped-css - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

yarn.lock

9

index.js

@@ -50,3 +50,6 @@ // @ts-check

JSXElement(path, stats) {
if (!this.hasScopedCss) {
if (
!this.hasScopedCss ||
path.node.openingElement.name.type === 'JSXMemberExpression'
) {
return

@@ -58,4 +61,4 @@ }

t.jsxIdentifier(`data-v-${hash}`),
t.jsxExpressionContainer(t.stringLiteral(''))
)
t.jsxExpressionContainer(t.stringLiteral('')),
),
)

@@ -62,0 +65,0 @@ },

{
"name": "babel-plugin-react-scoped-css",
"version": "0.3.0",
"version": "0.3.1",
"main": "index.js",

@@ -19,3 +19,3 @@ "license": "MIT",

],
"gitHead": "f5c773d20072818bb68d376ff2192b33557ed32f"
"gitHead": "5edcd58f6b82bade9cf8a72e7045ab8b4d3d9ad3"
}

@@ -93,4 +93,25 @@ # React scoped CSS

## Some common use cases with scoped css
## Some common use cases with react scoped css
Check out [simple-scoped-css-example](https://github.com/gaoxiaoliangz/react-scoped-css/tree/master/examples/simple)
## Use scoped css in create react app
Due to the fact that create react app doesn't allow user to modify the config of webpack or babel, I created my own fork of a configurable version of it. You can find it [here](https://github.com/gaoxiaoliangz/create-react-app/tree/master/packages/react-scripts).
### Use in a new create-react-app project
```
create-react-app app_name --scripts-version=@gxl/react-scripts
```
and you are good to go, react scoped css is supported by default
### Use in an existing create-react-app project (which hasn't been ejected yet)
```
npm install @gxl/react-scripts --save-dev
npm remove react-scripts
```
and next time you start your project you're bootstrapping from @gxl/react-scripts
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc