Skip to content

Commit

Permalink
chore: remove useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
poyoho committed Apr 28, 2022
1 parent 8a6c853 commit 57b936b
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,6 @@ export interface CSSModulesOptions {
| null
}

interface CompileCSSResult {
code: string
map?: SourceMapInput
ast?: PostCSS.Result
modules?: Record<string, string>
deps?: Set<string>
}

type CSSCompiler = (
id: string,
raw: string,
ssr?: boolean
) => Promise<CompileCSSResult>

const cssLangs = `\\.(css|less|sass|scss|styl|stylus|pcss|postcss)($|\\?)`
const cssLangRE = new RegExp(cssLangs)
const cssModuleRE = new RegExp(`\\.module${cssLangs}`)
Expand Down Expand Up @@ -638,7 +624,13 @@ async function compileCSS(
urlReplacer: CssUrlReplacer,
atImportResolvers: CSSAtImportResolvers,
server?: ViteDevServer
): Promise<CompileCSSResult> {
): Promise<{
code: string
map?: SourceMapInput
ast?: PostCSS.Result
modules?: Record<string, string>
deps?: Set<string>
}> {
const {
modules: modulesOptions,
preprocessorOptions,
Expand Down

0 comments on commit 57b936b

Please sign in to comment.