Skip to content

Commit

Permalink
fix: revert #2541, fix #3084 #3101 (#3144)
Browse files Browse the repository at this point in the history
This reverts commit 1451b78.
  • Loading branch information
patak-dev committed Apr 25, 2021
1 parent 6f97343 commit f4e7918
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/vite/src/node/plugins/importAnalysisBuild.ts
Expand Up @@ -221,7 +221,6 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {

if (imports.length) {
const s = new MagicString(code)
const analyzed: Set<string> = new Set<string>()
for (let index = 0; index < imports.length; index++) {
const { s: start, e: end, d: dynamicIndex } = imports[index]
// if dynamic import polyfill is used, rewrite the import to
Expand All @@ -238,8 +237,6 @@ export function buildImportAnalysisPlugin(config: ResolvedConfig): Plugin {
// literal import - trace direct imports and add to deps
const addDeps = (filename: string) => {
if (filename === ownerFilename) return
if (analyzed.has(filename)) return
analyzed.add(filename)
const chunk = bundle[filename] as OutputChunk | undefined
if (chunk) {
deps.add(config.base + chunk.fileName)
Expand Down

0 comments on commit f4e7918

Please sign in to comment.