even more other esbuild
This commit is contained in:
@@ -8,9 +8,7 @@ async function ensureEsbuildInialized() {
|
||||
wasmURL: "https://unpkg.com/esbuild-wasm@0.11.19/esbuild.wasm",
|
||||
worker: false,
|
||||
});
|
||||
console.log("init");
|
||||
await esbuildInitalized;
|
||||
console.log("initalized");
|
||||
esbuildInitalized = true;
|
||||
} else if (esbuildInitalized instanceof Promise) {
|
||||
await esbuildInitalized;
|
||||
@@ -29,7 +27,6 @@ addEventListener("DOMContentLoaded", () => {
|
||||
});
|
||||
`;
|
||||
await ensureEsbuildInialized();
|
||||
console.log("bundle");
|
||||
const bundle = await esbuild.build({
|
||||
plugins: [denoPlugin({ loader: "portable" })],
|
||||
write: false,
|
||||
@@ -44,6 +41,5 @@ addEventListener("DOMContentLoaded", () => {
|
||||
sourcefile: `fresh://entrypoint/${page.name}`,
|
||||
},
|
||||
});
|
||||
console.log("bundled");
|
||||
return bundle.outputFiles[0].text;
|
||||
}
|
||||
|
||||
+3
-5
@@ -8,14 +8,12 @@ export { extname } from "https://deno.land/std@0.95.0/path/mod.ts";
|
||||
export * as oak from "https://deno.land/x/oak@v7.4.0/mod.ts";
|
||||
|
||||
// -- esbuild --
|
||||
let now = 1;
|
||||
let start = new Date().getTime();
|
||||
globalThis.performance = {
|
||||
now() {
|
||||
now++;
|
||||
console.log(now);
|
||||
return now;
|
||||
return new Date().getTime() - start;
|
||||
},
|
||||
};
|
||||
import * as esbuild from "https://gist.githubusercontent.com/lucacasonato/766a6589f536f5536d98b1034a5d51d67c129d85/raw/137ef6cb91788d8f5d06a25f11eabd455acdd2e6/esbuild-wasm.js";
|
||||
import * as esbuild from "https://gist.githubusercontent.com/lucacasonato/358c6b7e8198bfb2cf3d220e49fdcf5f/raw/3714cb0f59606eefc29ed0fea36d4cd93549938b/esbuild-wasm.js";
|
||||
export { esbuild };
|
||||
export { denoPlugin } from "https://raw.githubusercontent.com/lucacasonato/esbuild_deno_loader/c5ee642f4552078324badbf1b541c7222c07d5ff/mod.ts";
|
||||
|
||||
Reference in New Issue
Block a user