Skip to content

Commit 28fa559

Browse files
authored
skip transform for storybook (#2177)
1 parent 63a2de5 commit 28fa559

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

babel.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ module.exports = {
2424
plugins: [
2525
...(process.env.BABEL_MODULE === 'commonjs'
2626
? ['@babel/plugin-transform-modules-commonjs']
27+
: process.env.STORYBOOK
28+
? []
2729
: [
2830
'transform-commonjs' // theme-preval is commonjs and needs to be transformed to esm
2931
]),

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"build": "./script/build",
3939
"start": "concurrently npm:start:*",
4040
"start:docs": "cd docs && npm run develop",
41-
"start:storybook": "start-storybook -p 6006",
41+
"start:storybook": "STORYBOOK=true start-storybook -p 6006",
4242
"build:storybook": "script/build-storybook",
4343
"build:docs": "script/build-docs",
4444
"build:docs:preview": "script/build-docs preview",

script/build-storybook

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ else
99
fi
1010

1111
# Build storybook inside docs
12-
./node_modules/.bin/build-storybook -o docs/public/storybook -s docs/public/static
12+
STORYBOOK=true ./node_modules/.bin/build-storybook -o docs/public/storybook -s docs/public/static
1313

1414
# Remove manager-head after build to not interfere with dev builds
1515
rm .storybook/manager-head.html

0 commit comments

Comments
 (0)