Skip to content

Commit

Permalink
chore!: bump esbuild to 0.15.6 (#9934)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Aug 31, 2022
1 parent 8f315a2 commit 091537c
Show file tree
Hide file tree
Showing 3 changed files with 242 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
},
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
"dependencies": {
"esbuild": "^0.14.47",
"esbuild": "^0.15.6",
"postcss": "^8.4.16",
"resolve": "^1.22.1",
"rollup": "~2.78.0"
Expand Down
26 changes: 0 additions & 26 deletions packages/vite/src/node/optimizer/esbuildDepPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import path from 'node:path'
import { promises as fs } from 'node:fs'
import type { ImportKind, Plugin } from 'esbuild'
import { KNOWN_ASSET_TYPES } from '../constants'
import { getDepOptimizationConfig } from '..'
Expand All @@ -8,7 +7,6 @@ import {
flattenId,
isBuiltin,
isExternalUrl,
isRunningWithYarnPnp,
moduleListContains,
normalizePath
} from '../utils'
Expand Down Expand Up @@ -300,30 +298,6 @@ module.exports = Object.create(new Proxy({}, {
}
}
)

// yarn 2 pnp compat
if (isRunningWithYarnPnp) {
build.onResolve(
{ filter: /.*/ },
async ({ path: id, importer, kind, resolveDir, namespace }) => {
const resolved = await resolve(
id,
importer,
kind,
// pass along resolveDir for entries
namespace === 'dep' ? resolveDir : undefined
)
if (resolved) {
return resolveResult(id, resolved)
}
}
)

build.onLoad({ filter: /.*/ }, async (args) => ({
contents: await fs.readFile(args.path),
loader: 'default'
}))
}
}
}
}
Expand Down
Loading

0 comments on commit 091537c

Please sign in to comment.