diff options
| author | Shinigami <[email protected]> | 2024-02-16 16:23:27 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-16 15:23:27 +0000 |
| commit | db88a1518e8d0ccfe191bd48a1ae8641a9a25303 (patch) | |
| tree | 6dec3716967b04b8839dc4b5c4b2f13021fa0733 /scripts/bundle.ts | |
| parent | 44d698e14f48a32259fd52a39d1e3028f84f3c06 (diff) | |
| download | faker-db88a1518e8d0ccfe191bd48a1ae8641a9a25303.tar.xz faker-db88a1518e8d0ccfe191bd48a1ae8641a9a25303.zip | |
chore!: switch to tsup (#2391)
Diffstat (limited to 'scripts/bundle.ts')
| -rw-r--r-- | scripts/bundle.ts | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/scripts/bundle.ts b/scripts/bundle.ts deleted file mode 100644 index c5465315..00000000 --- a/scripts/bundle.ts +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env node - -import { buildSync } from 'esbuild'; -import { globSync } from 'glob'; -import { allLocales } from '../src'; - -console.log('Building dist for node (cjs)...'); - -const target = ['ES2022', 'node18']; - -buildSync({ - entryPoints: globSync('./src/**/*.ts'), - // We can use the following entry points when esbuild supports cjs+splitting - // entryPoints: [ - // './src/index.ts', - // ...Object.keys(locales).map((locale) => `./src/locale/${locale}.ts`), - // ], - outdir: './dist/cjs', - bundle: false, // Creates 390MiB bundle ... - sourcemap: false, - minify: true, - // splitting: true, // Doesn't work with cjs - format: 'cjs', - platform: 'node', - target, -}); - -console.log('Building dist for node type=module (esm)...'); -buildSync({ - entryPoints: [ - './src/index.ts', - ...Object.keys(allLocales).map((locale) => `./src/locale/${locale}.ts`), - ], - outdir: './dist/esm', - bundle: true, - sourcemap: false, - minify: true, - splitting: true, - format: 'esm', - target, - outExtension: { '.js': '.mjs' }, -}); |
