mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
35 lines
982 B
JavaScript
35 lines
982 B
JavaScript
const esbuild = require("esbuild");
|
|
const sveltePlugin = require("esbuild-svelte");
|
|
const path = require("path");
|
|
|
|
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));
|