File tree Expand file tree Collapse file tree 4 files changed +32
-14
lines changed Expand file tree Collapse file tree 4 files changed +32
-14
lines changed Original file line number Diff line number Diff line change 63
63
projectToken : ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
64
64
buildScriptName : ' storybook:build'
65
65
exitOnceUploaded : true
66
- onlyChanged : ' !(v*/contrib)'
67
- externals : ' packages/uui-css/lib/**/*.css'
66
+ onlyChanged : true,
68
67
untraced : ' .storybook/images/**/*,storyhelpers/**/*'
Original file line number Diff line number Diff line change 1
1
import { dirname , join } from 'path' ;
2
+ import turbosnap from 'vite-plugin-turbosnap' ;
3
+ import { mergeConfig } from 'vite' ;
2
4
const remarkGfm = require ( 'remark-gfm' ) . default ;
3
5
const tsconfigPaths = require ( 'vite-tsconfig-paths' ) . default ;
4
6
@@ -44,12 +46,21 @@ module.exports = {
44
46
const processLitCSSPlugin = (
45
47
await import ( '../scripts/processLitCSSPlugin.mjs' )
46
48
) . default ;
47
- config . plugins . push ( processLitCSSPlugin ( ) ) ;
48
- if ( configType === 'DEVELOPMENT' ) {
49
- // add plugins
50
- config . plugins . push ( tsconfigPaths ( ) ) ;
51
- }
52
- return config ;
49
+
50
+ return mergeConfig ( config , {
51
+ plugins : [
52
+ processLitCSSPlugin ( ) ,
53
+ configType === 'PRODUCTION'
54
+ ? [
55
+ turbosnap ( {
56
+ // This should be the base path of your storybook. In monorepos, you may only need process.cwd().
57
+ rootDir : process . cwd ( ) ,
58
+ } ) ,
59
+ ]
60
+ : [ ] ,
61
+ configType === 'DEVELOPMENT' ? [ tsconfigPaths ( ) ] : [ ] ,
62
+ ] ,
63
+ } ) ;
53
64
} ,
54
65
docs : {
55
66
autodocs : true ,
Original file line number Diff line number Diff line change 47
47
"pack" : " node ./scripts/pack-package.js" ,
48
48
"chromatic" : " npx chromatic --build-script-name storybook:build" ,
49
49
"storybook" : " npm run bootstrap && npm run storybook:analyze && storybook dev -p 6006" ,
50
- "storybook:build" : " npm run bootstrap && npm run storybook:analyze && storybook build --webpack-stats-json " ,
50
+ "storybook:build" : " npm run bootstrap && npm run storybook:analyze && storybook build" ,
51
51
"storybook:analyze" : " web-component-analyzer **/*.element.ts --outFile custom-elements.json" ,
52
52
"postinstall" : " npm run bootstrap"
53
53
},
82
82
"@web/test-runner-playwright" : " 0.11.0" ,
83
83
"autoprefixer" : " 10.4.17" ,
84
84
"babel-loader" : " 9.1.3" ,
85
- "chromatic" : " 10.7.1 " ,
85
+ "chromatic" : " 11.0.0 " ,
86
86
"element-internals-polyfill" : " 1.3.10" ,
87
87
"esbuild" : " 0.20.0" ,
88
88
"eslint" : " 8.56.0" ,
129
129
"turbo" : " 1.12.2" ,
130
130
"typescript" : " 5.2.2" ,
131
131
"vite" : " 5.0.12" ,
132
+ "vite-plugin-turbosnap" : " ^1.0.3" ,
132
133
"vite-tsconfig-paths" : " 4.3.1" ,
133
134
"web-component-analyzer" : " 2.0.0"
134
135
},
You can’t perform that action at this time.
0 commit comments