Skip to content

Commit

Permalink
chore: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
caoxiemeihao committed Apr 27, 2023
1 parent 17b1eb0 commit 2a4f240
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/resolve.ts
Expand Up @@ -147,7 +147,7 @@ export class Resolve {
ipte = ipte.replace(find, replacement)
} else {
// compatible with vite restrictions
// https://github.com/vitejs/vite/blob/1e9615d8614458947a81e0d4753fe61f3a277cb3/packages/vite/src/node/plugins/importAnalysis.ts#L672
// https://github.com/vitejs/vite/blob/v2.9.15/packages/vite/src/node/plugins/importAnalysis.ts#L714-L717 - 2.x
const relativePath = relativeify(path.posix.relative(
// Usually, the `replacement` we use is the directory path
// So we also use the `path.dirname` path for calculation
Expand Down Expand Up @@ -178,8 +178,7 @@ export class Resolve {
result.importee = importee.slice(1)
result.importeeRaw = importee
result.startQuotation = importee.slice(0, 1)
// why not `endQuotation` ?
// in fact, may be parse `endQuotation` is meaningless
// Why not `endQuotation`? May be parse `endQuotation` is meaningless
// e.g. `import('./foo/' + path)`
}
return result
Expand Down

0 comments on commit 2a4f240

Please sign in to comment.