diff --git a/babel.config.js b/babel.config.js index 55eaa7d8c64..8df549cd2dd 100644 --- a/babel.config.js +++ b/babel.config.js @@ -24,6 +24,8 @@ module.exports = { plugins: [ ...(process.env.BABEL_MODULE === 'commonjs' ? ['@babel/plugin-transform-modules-commonjs'] + : process.env.STORYBOOK + ? [] : [ 'transform-commonjs' // theme-preval is commonjs and needs to be transformed to esm ]), diff --git a/package-lock.json b/package-lock.json index 048810fa785..bd90db2d979 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@primer/react", - "version": "35.3.0", + "version": "35.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@primer/react", - "version": "35.3.0", + "version": "35.4.0", "license": "MIT", "dependencies": { "@primer/behaviors": "^1.1.1", diff --git a/package.json b/package.json index a8d88371fdd..0a35044687d 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "build": "./script/build", "start": "concurrently npm:start:*", "start:docs": "cd docs && npm run develop", - "start:storybook": "start-storybook -p 6006", + "start:storybook": "STORYBOOK=true start-storybook -p 6006", "build:storybook": "script/build-storybook", "build:docs": "script/build-docs", "build:docs:preview": "script/build-docs preview", diff --git a/script/build-storybook b/script/build-storybook index 6a221c00b36..5bead385141 100755 --- a/script/build-storybook +++ b/script/build-storybook @@ -9,7 +9,7 @@ else fi # Build storybook inside docs -./node_modules/.bin/build-storybook -o docs/public/storybook -s docs/public/static +STORYBOOK=true ./node_modules/.bin/build-storybook -o docs/public/storybook -s docs/public/static # Remove manager-head after build to not interfere with dev builds rm .storybook/manager-head.html