mirror of https://github.com/wg-easy/wg-easy
committed by
GitHub
4 changed files with 416 additions and 278 deletions
@ -1,25 +0,0 @@ |
|||
// @ts-check
|
|||
|
|||
import { fileURLToPath } from 'node:url'; |
|||
import esbuild from 'esbuild'; |
|||
|
|||
esbuild.build({ |
|||
entryPoints: [fileURLToPath(new URL('./index.ts', import.meta.url))], |
|||
bundle: true, |
|||
outfile: fileURLToPath(new URL('../.output/server/cli.mjs', import.meta.url)), |
|||
platform: 'node', |
|||
format: 'esm', |
|||
plugins: [ |
|||
{ |
|||
name: 'make-all-packages-external', |
|||
setup(build) { |
|||
let filter = /^[^./]|^\.[^./]|^\.\.[^/]/; // Must not start with "/" or "./" or "../"
|
|||
build.onResolve({ filter }, (args) => ({ |
|||
path: args.path, |
|||
external: true, |
|||
})); |
|||
}, |
|||
}, |
|||
], |
|||
logLevel: 'info', |
|||
}); |
@ -0,0 +1,13 @@ |
|||
import { fileURLToPath } from 'node:url'; |
|||
import { defineConfig } from 'rolldown'; |
|||
|
|||
export default defineConfig({ |
|||
input: fileURLToPath(new URL('./index.ts', import.meta.url)), |
|||
output: { |
|||
format: 'esm', |
|||
file: fileURLToPath(new URL('../.output/server/cli.mjs', import.meta.url)), |
|||
}, |
|||
platform: 'node', |
|||
external: [/^[^./]|^\.[^./]|^\.\.[^/]/], |
|||
logLevel: 'info', |
|||
}); |
File diff suppressed because it is too large
Loading…
Reference in new issue