Skip to content

Commit

Permalink
chore: typo (#2420)
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework authored Mar 8, 2021
1 parent 6720f65 commit f4998c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const cssLangs = `\\.(css|less|sass|scss|styl|stylus|postcss)($|\\?)`
const cssLangRE = new RegExp(cssLangs)
const cssModuleRE = new RegExp(`\\.module${cssLangs}`)
const directRequestRE = /(\?|&)direct\b/
const commjsProxyRE = /\?commonjs-proxy/
const commonjsProxyRE = /\?commonjs-proxy/

export const isCSSRequest = (request: string) =>
cssLangRE.test(request) && !directRequestRE.test(request)
Expand Down Expand Up @@ -120,7 +120,7 @@ export function cssPlugin(config: ResolvedConfig): Plugin {
},

async transform(raw, id) {
if (!cssLangRE.test(id) || commjsProxyRE.test(id)) {
if (!cssLangRE.test(id) || commonjsProxyRE.test(id)) {
return
}

Expand Down Expand Up @@ -217,7 +217,7 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
name: 'vite:css-post',

transform(css, id, ssr) {
if (!cssLangRE.test(id) || commjsProxyRE.test(id)) {
if (!cssLangRE.test(id) || commonjsProxyRE.test(id)) {
return
}

Expand Down Expand Up @@ -269,7 +269,7 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
if (
!isCSSRequest(id) ||
cssModuleRE.test(id) ||
commjsProxyRE.test(id)
commonjsProxyRE.test(id)
) {
isPureCssChunk = false
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ export function tryNodeResolve(
) {
return { id: resolved }
}
// if we reach here, it's a valid dep import that hasn't been optimzied.
// if we reach here, it's a valid dep import that hasn't been optimized.
const isJsType = OPTIMIZABLE_ENTRY_RE.test(resolved)
const exclude = server.config.optimizeDeps?.exclude
if (
Expand Down

0 comments on commit f4998c0

Please sign in to comment.