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 {
4444 return 'audio'
4545 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 ) )
4646 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 ) )
4848 return 'text'
4949 return 'other'
5050}
@@ -73,11 +73,17 @@ export function setupAssetsRPC(config: SetupAssetsOptions) {
7373 // font
7474 '**/*.(woff2?|eot|ttf|otf|ttc|pfa|pfb|pfm|afm)' ,
7575 // 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 )' ,
7777 ] , {
7878 cwd : dir ,
7979 onlyFiles : true ,
80- ignore : [ '**/node_modules/**' , '**/dist/**' ] ,
80+ ignore : [
81+ '**/node_modules/**' ,
82+ '**/dist/**' ,
83+ '**/package-lock.*' ,
84+ '**/pnpm-lock.*' ,
85+ '**/pnpm-workspace.*' ,
86+ ] ,
8187 } )
8288
8389 cache = await Promise . all ( files . map ( async ( path ) => {
You can’t perform that action at this time.
0 commit comments