Skip to content

Commit

Permalink
chore: fix typos (#12032)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lioness100 authored Feb 12, 2023
1 parent 5364c90 commit ee1a686
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/vite/src/node/optimizer/optimizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ async function createDepsOptimizer(
id,
file: getOptimizedDepPath(id, config, ssr),
src: resolved,
// Assing a browserHash to this missing dependency that is unique to
// Adding a browserHash to this missing dependency that is unique to
// the current state of known + missing deps. If its optimizeDeps run
// doesn't alter the bundled files of previous known dependencies,
// we don't need a full reload and this browserHash will be kept
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/importAnalysisBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {
// The importerUrl is passed as third parameter to __vitePreload in this case
`function(dep, importerUrl) { return new URL(dep, importerUrl).href }`
: // If the base isn't relative, then the deps are relative to the projects `outDir` and the base
// is appendended inside __vitePreload too.
// is appended inside __vitePreload too.
`function(dep) { return ${JSON.stringify(config.base)}+dep }`
const preloadCode = `const scriptRel = ${scriptRel};const assetsURL = ${assetsURL};const seen = {};export const ${preloadMethod} = ${preload.toString()}`

Expand Down
6 changes: 3 additions & 3 deletions packages/vite/src/node/ssr/ssrStacktrace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ export function ssrRewriteStacktrace(
return input
}

const trimedVarName = varName.trim()
const trimmedVarName = varName.trim()
const source = `${pos.source}:${pos.line}:${pos.column}`
if (!trimedVarName || trimedVarName === 'eval') {
if (!trimmedVarName || trimmedVarName === 'eval') {
return ` at ${source}`
} else {
return ` at ${trimedVarName} (${source})`
return ` at ${trimmedVarName} (${source})`
}
},
)
Expand Down
4 changes: 2 additions & 2 deletions playground/optimize-deps/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ <h2>Non Optimized Module isn't duplicated</h2>
// test dep detection in globbed files
const globbed = import.meta.glob('./glob/*.js', { eager: true })

import cjsBrowerFieldBare from '@vitejs/test-dep-cjs-browser-field-bare'
text('.cjs-browser-field-bare', cjsBrowerFieldBare)
import cjsBrowserFieldBare from '@vitejs/test-dep-cjs-browser-field-bare'
text('.cjs-browser-field-bare', cjsBrowserFieldBare)

import { camelCase } from '@vitejs/test-dep-linked'
text('.deps-linked', camelCase('foo-bar-baz'))
Expand Down
2 changes: 1 addition & 1 deletion playground/worker/worker/main-classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let classicWorker = new Worker(
// test comment
)

// just test for case: ') ... ,' mean no worker options parmas
// just test for case: ') ... ,' mean no worker options params
classicWorker = new Worker(new URL('../classic-worker.js', import.meta.url))

classicWorker.addEventListener('message', ({ data }) => {
Expand Down

0 comments on commit ee1a686

Please sign in to comment.