File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,11 @@ const config: StorybookConfig = {
1616
1717 viteFinal ( config ) {
1818 return mergeConfig ( config , {
19- plugins : [ tsConfigPaths ( ) ] ,
19+ plugins : [
20+ tsConfigPaths ( {
21+ projects : [ './tsconfig.dev.json' , './tsconfig.build.json' ] ,
22+ } ) ,
23+ ] ,
2024 css : {
2125 preprocessorOptions : {
2226 scss : {
@@ -25,6 +29,9 @@ const config: StorybookConfig = {
2529 } ,
2630 } ,
2731 } ,
32+ esbuild : {
33+ jsx : 'automatic' ,
34+ } ,
2835 } ) ;
2936 } ,
3037} ;
Original file line number Diff line number Diff line change 1- const { NODE_ENV } = process . env ;
1+ // Node.js environment with default
2+ // https://nodejs.org/en/learn/getting-started/nodejs-the-difference-between-development-and-production
3+ const { NODE_ENV = 'development' } = process . env ;
24
35/**
46 * Babel config
@@ -25,7 +27,7 @@ module.exports = {
2527 [
2628 '@babel/preset-react' ,
2729 {
28- development : NODE_ENV === 'development' ,
30+ development : NODE_ENV === 'test' || NODE_ENV === ' development',
2931 runtime : 'automatic' ,
3032 useBuiltIns : true ,
3133 } ,
Original file line number Diff line number Diff line change 5252 ],
5353 "scripts" : {
5454 "cleanup" : " rm -rf dist/ > /dev/null" ,
55- "build" : " yarn cleanup && rollup -c" ,
56- "storybook" : " NODE_ENV=development storybook dev -p 6006" ,
55+ "build" : " NODE_ENV=production yarn cleanup && rollup -c" ,
56+ "storybook" : " storybook dev -p 6006" ,
5757 "build-storybook" : " storybook build" ,
5858 "test" : " jest" ,
5959 "test:watch" : " jest --watch" ,
You can’t perform that action at this time.
0 commit comments