Skip to content

Commit

Permalink
skip transform for storybook (primer#2177)
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthkp authored Jul 19, 2022
1 parent 63a2de5 commit 28fa559
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
]),
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion script/build-storybook
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 28fa559

Please sign in to comment.