Skip to content

Commit 3062937

Browse files
committed
fix: try to ignore md pages in storybook
1 parent 3698abc commit 3062937

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.storybook/main.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ const config = {
88
backgrounds: false,
99
},
1010
async viteFinal(config) {
11+
config.plugins ??= []
12+
13+
config.plugins.push({
14+
name: 'ignore-internals',
15+
transform(_, id) {
16+
if (id.includes('/app/pages/blog/') && id.endsWith('.md')) {
17+
return 'export default {}'
18+
}
19+
},
20+
})
1121
// Replace the built-in vue-docgen plugin with a fault-tolerant version.
1222
// vue-docgen-api can crash on components that import types from other
1323
// .vue files (it tries to parse the SFC with @babel/parser as plain TS).

0 commit comments

Comments
 (0)