feat: transform for latest-2 browser releases (#34)
This commit is contained in:
+3
-1
@@ -1,4 +1,4 @@
|
||||
import { join } from "./deps.ts";
|
||||
import { join, resolve } from "./deps.ts";
|
||||
import { error } from "./error.ts";
|
||||
import { routes } from "./routes.ts";
|
||||
|
||||
@@ -44,6 +44,8 @@ export async function initSubcommand(rawArgs: Record<string, any>) {
|
||||
}
|
||||
|
||||
async function init(directory: string) {
|
||||
directory = resolve(directory);
|
||||
|
||||
try {
|
||||
const dir = [...Deno.readDirSync(directory)];
|
||||
if (dir.length > 0) {
|
||||
|
||||
+10
-8
@@ -33,19 +33,21 @@ export class Bundler {
|
||||
|
||||
await ensureEsbuildInialized();
|
||||
const bundle = await esbuild.build({
|
||||
plugins: [freshPlugin(this.#pages), denoPlugin({ loader: "portable" })],
|
||||
write: false,
|
||||
bundle: true,
|
||||
minify: true,
|
||||
treeShaking: true,
|
||||
splitting: true,
|
||||
platform: "neutral",
|
||||
outfile: "",
|
||||
entryPoints,
|
||||
format: "esm",
|
||||
jsxFactory: "h",
|
||||
jsxFragment: "Fragment",
|
||||
metafile: true,
|
||||
minify: true,
|
||||
outdir: `/`,
|
||||
entryPoints,
|
||||
outfile: "",
|
||||
platform: "neutral",
|
||||
plugins: [freshPlugin(this.#pages), denoPlugin({ loader: "portable" })],
|
||||
splitting: true,
|
||||
target: ["chrome89", "firefox88", "safari13"],
|
||||
treeShaking: true,
|
||||
write: false,
|
||||
});
|
||||
|
||||
const metafileOutputs = bundle.metafile!.outputs;
|
||||
|
||||
Reference in New Issue
Block a user