Add notepad
This commit is contained in:
44
esbuild.js
Executable file
44
esbuild.js
Executable file
@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env node
|
||||
// @ts-check
|
||||
const { build } = require("esbuild")
|
||||
const sassPlugin = require("esbuild-plugin-sass")
|
||||
const { nodeBuiltIns } = require("esbuild-node-builtins")
|
||||
|
||||
const args = process.argv.slice(2)
|
||||
|
||||
build({
|
||||
bundle: true,
|
||||
define: {
|
||||
"process.browser": "true",
|
||||
"process.env.BLUEPRINT_NAMESPACE": '"bp4"',
|
||||
global: "globalThis",
|
||||
},
|
||||
entryPoints: ["electron/app/index.tsx"],
|
||||
inject: ["./scripts/react-shim.js"],
|
||||
outdir: "electron/bundled",
|
||||
external: ["path", "glob", "fs", "util"],
|
||||
jsxFactory: "esbuildCreateElement",
|
||||
jsxFragment: "esbuildFragment",
|
||||
plugins: [
|
||||
sassPlugin(),
|
||||
nodeBuiltIns({
|
||||
include: ["path", "fs"],
|
||||
}),
|
||||
],
|
||||
target: ["chrome90"],
|
||||
tsconfig: "./tsconfig.json",
|
||||
sourcemap: "inline",
|
||||
minify: process.env.NODE_ENV === "production",
|
||||
banner: {
|
||||
js: "/* eslint-disable */",
|
||||
},
|
||||
loader: {
|
||||
".png": "file",
|
||||
".eot": "file",
|
||||
".svg": "file",
|
||||
".woff": "file",
|
||||
".woff2": "file",
|
||||
".ttf": "file",
|
||||
},
|
||||
watch: args.includes("-w") || args.includes("--watch"),
|
||||
})
|
Reference in New Issue
Block a user