Skip to content

Commit

Permalink
Build: Invert JSX pragma application condition (#7701)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth authored and gziolo committed Jul 4, 2018
1 parent 375b406 commit 93ed7f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/packages/get-babel-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const plugins = map( babelDefaultConfig.plugins, ( plugin ) => {
return plugin;
} );

if ( process.env.TRANSFORM_JSX_PRAGMA ) {
if ( ! process.env.SKIP_JSX_PRAGMA_TRANSFORM ) {
plugins.push( [ require( '../../packages/babel-plugin-import-jsx-pragma' ).default, {
scopeVariable: 'createElement',
source: '@wordpress/element',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@
"scripts": {
"prebuild": "npm run check-engines",
"clean:packages": "rimraf ./packages/*/build ./packages/*/build-module",
"prebuild:packages": "npm run clean:packages && cross-env INCLUDE_PACKAGES=babel-plugin-import-jsx-pragma node ./bin/packages/build.js",
"build:packages": "cross-env TRANSFORM_JSX_PRAGMA=1 EXCLUDE_PACKAGES=babel-plugin-import-jsx-pragma node ./bin/packages/build.js",
"prebuild:packages": "npm run clean:packages && cross-env INCLUDE_PACKAGES=babel-plugin-import-jsx-pragma SKIP_JSX_PRAGMA_TRANSFORM=1 node ./bin/packages/build.js",
"build:packages": "cross-env EXCLUDE_PACKAGES=babel-plugin-import-jsx-pragma node ./bin/packages/build.js",
"build": "npm run build:packages && cross-env NODE_ENV=production webpack",
"check-engines": "check-node-version --package",
"ci": "concurrently \"npm run lint && npm run build\" \"npm run test-unit:coverage-ci\"",
Expand Down

0 comments on commit 93ed7f7

Please sign in to comment.