Skip to content

Commit f4998c0

Browse files
authored
chore: typo (#2420)
1 parent 6720f65 commit f4998c0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/vite/src/node/plugins/css.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const cssLangs = `\\.(css|less|sass|scss|styl|stylus|postcss)($|\\?)`
7979
const cssLangRE = new RegExp(cssLangs)
8080
const cssModuleRE = new RegExp(`\\.module${cssLangs}`)
8181
const directRequestRE = /(\?|&)direct\b/
82-
const commjsProxyRE = /\?commonjs-proxy/
82+
const commonjsProxyRE = /\?commonjs-proxy/
8383

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

122122
async transform(raw, id) {
123-
if (!cssLangRE.test(id) || commjsProxyRE.test(id)) {
123+
if (!cssLangRE.test(id) || commonjsProxyRE.test(id)) {
124124
return
125125
}
126126

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

219219
transform(css, id, ssr) {
220-
if (!cssLangRE.test(id) || commjsProxyRE.test(id)) {
220+
if (!cssLangRE.test(id) || commonjsProxyRE.test(id)) {
221221
return
222222
}
223223

@@ -269,7 +269,7 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
269269
if (
270270
!isCSSRequest(id) ||
271271
cssModuleRE.test(id) ||
272-
commjsProxyRE.test(id)
272+
commonjsProxyRE.test(id)
273273
) {
274274
isPureCssChunk = false
275275
}

packages/vite/src/node/plugins/resolve.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ export function tryNodeResolve(
353353
) {
354354
return { id: resolved }
355355
}
356-
// if we reach here, it's a valid dep import that hasn't been optimzied.
356+
// if we reach here, it's a valid dep import that hasn't been optimized.
357357
const isJsType = OPTIMIZABLE_ENTRY_RE.test(resolved)
358358
const exclude = server.config.optimizeDeps?.exclude
359359
if (

0 commit comments

Comments
 (0)