Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix typos #12032

Merged
merged 1 commit into from
Feb 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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