feat: limited npm: specifier support (#1245)
This commit adds limited support for `npm:` specifiers. Right now, `npm:` specifiers are unsupported on Deno Deploy. Towards #978
This commit is contained in:
+4
-4
@@ -7,14 +7,14 @@ export { escape as regexpEscape } from "https://deno.land/std@0.190.0/regexp/esc
|
||||
|
||||
// -- esbuild --
|
||||
// @deno-types="https://deno.land/x/esbuild@v0.17.11/mod.d.ts"
|
||||
import * as esbuildWasm from "https://deno.land/x/esbuild@v0.17.11/wasm.js";
|
||||
import * as esbuildNative from "https://deno.land/x/esbuild@v0.17.11/mod.js";
|
||||
import * as esbuildWasm from "https://deno.land/x/esbuild@v0.17.19/wasm.js";
|
||||
import * as esbuildNative from "https://deno.land/x/esbuild@v0.17.19/mod.js";
|
||||
// @ts-ignore trust me
|
||||
// deno-lint-ignore no-deprecated-deno-api
|
||||
const esbuild: typeof esbuildWasm = Deno.run === undefined
|
||||
? esbuildWasm
|
||||
: esbuildNative;
|
||||
const esbuildWasmURL = new URL("./esbuild_v0.17.11.wasm", import.meta.url).href;
|
||||
const esbuildWasmURL = new URL("./esbuild_v0.17.19.wasm", import.meta.url).href;
|
||||
export { esbuild, esbuildWasm as esbuildTypes, esbuildWasmURL };
|
||||
|
||||
export { denoPlugins } from "https://deno.land/x/esbuild_deno_loader@0.7.2/mod.ts";
|
||||
export { denoPlugins } from "https://deno.land/x/esbuild_deno_loader@0.8.1/mod.ts";
|
||||
|
||||
@@ -54,7 +54,7 @@ export class EsbuildBuilder implements Builder {
|
||||
const bundle = await esbuild.build({
|
||||
entryPoints: opts.entrypoints,
|
||||
|
||||
platform: "neutral",
|
||||
platform: "browser",
|
||||
target: ["chrome99", "firefox99", "safari15"],
|
||||
|
||||
format: "esm",
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user