Skip to content

Commit

Permalink
refactor(css): remove export {}
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Sep 15, 2023
1 parent 21bbceb commit 98fbdc3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 25 deletions.
32 changes: 8 additions & 24 deletions packages/vite/client.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,14 @@ declare module '*.module.sss' {
}

// CSS
declare module '*.css' {
export {}
}
declare module '*.scss' {
export {}
}
declare module '*.sass' {
export {}
}
declare module '*.less' {
export {}
}
declare module '*.styl' {
export {}
}
declare module '*.stylus' {
export {}
}
declare module '*.pcss' {
export {}
}
declare module '*.sss' {
export {}
}
declare module '*.css' {}
declare module '*.scss' {}
declare module '*.sass' {}
declare module '*.less' {}
declare module '*.styl' {}
declare module '*.stylus' {}
declare module '*.pcss' {}
declare module '*.sss' {}

// Built-in asset types
// see `src/node/constants.ts`
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
code = `export default ${JSON.stringify(content)}`
} else {
// empty module when it's not a CSS module nor `?inline`
code = 'export {}'
code = ''
}

return {
Expand Down

0 comments on commit 98fbdc3

Please sign in to comment.