babel-plugin-react-transform
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -24,3 +24,3 @@ 'use strict'; | ||
if (specifiedPath[0] === '.') { | ||
throw new Error('Relative path like ' + specifiedPath + ' is only allowed if ' + 'babel-plugin-wrap-react-components is inside a node_modules folder.'); | ||
throw new Error('Relative path like ' + specifiedPath + ' is only allowed if ' + 'babel-plugin-react-transform is inside a node_modules folder.'); | ||
} | ||
@@ -101,5 +101,5 @@ return specifiedPath; | ||
} | ||
var pluginOptions = file.opts.extra['babel-plugin-wrap-react-components']; | ||
var pluginOptions = file.opts.extra['react-transform']; | ||
if (!Array.isArray(pluginOptions) || pluginOptions.length === 0) { | ||
throw new Error('babel-plugin-wrap-react-components requires that you specify ' + 'extras["babel-plugin-wrap-react-components"] in .babelrc ' + 'or in your Babel Node API call options, and that it is an array ' + 'with more than zero elements.'); | ||
throw new Error('babel-plugin-react-transform requires that you specify ' + 'extras["react-transform"] in .babelrc ' + 'or in your Babel Node API call options, and that it is an array ' + 'with more than zero elements.'); | ||
} | ||
@@ -194,3 +194,3 @@ return pluginOptions; | ||
return new Plugin('babel-plugin-wrap-react-components', { | ||
return new Plugin('babel-plugin-react-transform', { | ||
visitor: { | ||
@@ -197,0 +197,0 @@ Function: { |
{ | ||
"name": "babel-plugin-react-transform", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Babel plugin to instrument React components with custom transforms", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -33,3 +33,3 @@ # babel-plugin-react-transform | ||
Then edit your `.babelrc` to include `extra.babel-plugin-react-transform`. | ||
Then edit your `.babelrc` to include `extra.react-transform`. | ||
It must be an array of the transforms you want to use: | ||
@@ -41,7 +41,7 @@ | ||
"plugins": [ | ||
"babel-plugin-react-transform" | ||
"react-transform" | ||
], | ||
"extra": { | ||
// must be defined and be an array | ||
"babel-plugin-react-transform": [{ | ||
"react-transform": [{ | ||
// can be an NPM module name or a local path | ||
@@ -48,0 +48,0 @@ "target": "react-transform-webpack-hmr", |
@@ -20,3 +20,3 @@ import path from 'path'; | ||
extra: { | ||
'babel-plugin-wrap-react-components': [{ | ||
'react-transform': [{ | ||
target: 'my-custom-module/wrap', | ||
@@ -23,0 +23,0 @@ locals: ['module'], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
33592
13
0