2026-03-20 23:46:17 +01:00
|
|
|
const esbuild = require("esbuild");
|
|
|
|
|
const sveltePlugin = require("esbuild-svelte");
|
|
|
|
|
const path = require("path");
|
2026-03-07 09:04:22 +01:00
|
|
|
|
2026-03-20 23:46:17 +01:00
|
|
|
Promise.all([
|
|
|
|
|
// Build shim-loader.js
|
|
|
|
|
esbuild.build({
|
|
|
|
|
entryPoints: [path.join(__dirname, "src", "shims", "loader.js")],
|
|
|
|
|
bundle: true,
|
|
|
|
|
outfile: path.join(__dirname, "dist", "shim-loader.js"),
|
|
|
|
|
format: "iife",
|
|
|
|
|
platform: "browser",
|
|
|
|
|
target: ["chrome90"],
|
|
|
|
|
alias: {
|
|
|
|
|
path: "path-browserify",
|
|
|
|
|
},
|
|
|
|
|
logLevel: "info",
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
// Build ignis-ui.js
|
|
|
|
|
esbuild.build({
|
|
|
|
|
entryPoints: [path.join(__dirname, "src", "ui", "index.js")],
|
|
|
|
|
bundle: true,
|
|
|
|
|
outfile: path.join(__dirname, "dist", "ignis-ui.js"),
|
|
|
|
|
format: "iife",
|
|
|
|
|
globalName: "IgnisUI",
|
|
|
|
|
platform: "browser",
|
|
|
|
|
target: ["chrome90"],
|
|
|
|
|
mainFields: ["svelte", "browser", "module", "main"],
|
|
|
|
|
conditions: ["svelte", "browser"],
|
|
|
|
|
plugins: [sveltePlugin({ compilerOptions: { css: "injected" } })],
|
|
|
|
|
logLevel: "info",
|
|
|
|
|
}),
|
|
|
|
|
]).catch(() => process.exit(1));
|