File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
packages/core/src/vite-rpc Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ function guessType(path: string): AssetType {
44
44
return 'audio'
45
45
if ( / \. ( w o f f 2 ? | e o t | t t f | o t f | t t c | p f a | p f b | p f m | a f m ) / i. test ( path ) )
46
46
return 'font'
47
- if ( / \. ( j s o n [ 5 c ] ? | t e ? x t | [ m c ] ? [ j t ] s x ? | m d [ c x ] ? | m a r k d o w n ) / i. test ( path ) )
47
+ if ( / \. ( j s o n [ 5 c ] ? | t e ? x t | [ m c ] ? [ j t ] s x ? | m d [ c x ] ? | m a r k d o w n | y a ? m l | t o m l ) / i. test ( path ) )
48
48
return 'text'
49
49
return 'other'
50
50
}
@@ -73,11 +73,17 @@ export function setupAssetsRPC(config: SetupAssetsOptions) {
73
73
// font
74
74
'**/*.(woff2?|eot|ttf|otf|ttc|pfa|pfb|pfm|afm)' ,
75
75
// text
76
- '**/*.(json|json5|jsonc|txt|text|tsx|jsx|md|mdx|mdc|markdown)' ,
76
+ '**/*.(json|json5|jsonc|txt|text|tsx|jsx|md|mdx|mdc|markdown|yaml|yml|toml )' ,
77
77
] , {
78
78
cwd : dir ,
79
79
onlyFiles : true ,
80
- ignore : [ '**/node_modules/**' , '**/dist/**' ] ,
80
+ ignore : [
81
+ '**/node_modules/**' ,
82
+ '**/dist/**' ,
83
+ '**/package-lock.*' ,
84
+ '**/pnpm-lock.*' ,
85
+ '**/pnpm-workspace.*' ,
86
+ ] ,
81
87
} )
82
88
83
89
cache = await Promise . all ( files . map ( async ( path ) => {
You can’t perform that action at this time.
0 commit comments