Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit ebe147b

Browse files
committed
Upgrade esbuild to 0.11.22
1 parent 4730aca commit ebe147b

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

bundler/esbuild.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { join } from 'https://deno.land/[email protected]/path/mod.ts'
22
import { cache } from '../server/cache.ts'
33
import util from '../shared/util.ts'
4-
// @deno-types="https://deno.land/x/[email protected].15/mod.d.ts"
5-
import { build, stop, Plugin } from 'https://deno.land/x/[email protected].15/mod.js'
4+
// @deno-types="https://deno.land/x/[email protected].22/mod.d.ts"
5+
import { build, stop, Plugin } from 'https://deno.land/x/[email protected].22/mod.js'
66

77
export {
88
build as esbuild,

plugins/css.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,16 @@ export default (): LoaderPlugin => {
7979
}
8080

8181
if (app.mode === 'production') {
82-
// workaround for https://github.com/esbuild/deno-esbuild/issues/1
83-
const dir = await Deno.makeTempDir()
84-
const tempFile = join(dir, basename(url))
85-
await Deno.writeTextFile(tempFile, css)
8682
const ret = await esbuild({
87-
entryPoints: [tempFile],
83+
stdin: {
84+
loader: 'css',
85+
sourcefile: url,
86+
contents: css // 3.6mb, tailwind.css
87+
},
8888
bundle: false,
8989
minify: true,
9090
write: false
9191
})
92-
Deno.remove(tempFile)
9392
css = util.trimSuffix(ret.outputFiles[0].text, '\n')
9493
}
9594

0 commit comments

Comments
 (0)