|
|
@@ -1,8 +1,14 @@
|
|
|
/* eslint-disable no-undef */
|
|
|
import esbuild from "esbuild"
|
|
|
+import path from 'node:path';
|
|
|
+import { fileURLToPath } from 'node:url';
|
|
|
import { chmodSync, mkdirSync, copyFileSync } from "fs"
|
|
|
import { rimrafSync } from "rimraf"
|
|
|
|
|
|
+// ESM Polyfill
|
|
|
+const __filename = fileURLToPath(import.meta.url);
|
|
|
+const __dirname = path.dirname(__filename);
|
|
|
+
|
|
|
// Function to copy post-build files
|
|
|
function copyPostBuildFiles() {
|
|
|
try {
|
|
|
@@ -105,13 +111,6 @@ const __dirname = __dirname__(__filename);
|
|
|
"gray-matter",
|
|
|
"i18next",
|
|
|
"ignore",
|
|
|
- "ink",
|
|
|
- "ink-big-text",
|
|
|
- "ink-gradient",
|
|
|
- "ink-select-input",
|
|
|
- "ink-spinner",
|
|
|
- "ink-table",
|
|
|
- "ink-text-input",
|
|
|
"is-wsl",
|
|
|
"isbinaryfile",
|
|
|
"jotai",
|
|
|
@@ -171,6 +170,9 @@ const __dirname = __dirname__(__filename);
|
|
|
treeShaking: true,
|
|
|
logLevel: "info",
|
|
|
plugins: [afterBuildPlugin],
|
|
|
+ alias: {
|
|
|
+ 'is-in-ci': path.resolve(__dirname, 'src/patches/is-in-ci.ts'),
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (process.argv.includes("--watch")) {
|