mirror of
https://github.com/modrinth/code.git
synced 2026-07-31 13:16:38 +00:00
* Add explicit extensions to relative imports * Add linting rule * Fix outdated pnpm lock * fix: use esbuild --------- Co-authored-by: Prospector <6166773+Prospector@users.noreply.github.com> Co-authored-by: Calum H. (IMB11) <contact@cal.engineer> Co-authored-by: Calum H. <calum@modrinth.com>
25 lines
482 B
JavaScript
25 lines
482 B
JavaScript
import { build } from 'esbuild'
|
|
import dts from 'unplugin-dts/esbuild'
|
|
|
|
await build({
|
|
entryPoints: ['src/index.ts'],
|
|
outdir: 'dist',
|
|
entryNames: '[name]',
|
|
bundle: true,
|
|
format: 'esm',
|
|
platform: 'neutral',
|
|
target: 'es2020',
|
|
minify: true,
|
|
sourcemap: true,
|
|
legalComments: 'none',
|
|
external: ['ofetch', 'mitt', '@tauri-apps/plugin-http'],
|
|
plugins: [
|
|
dts({
|
|
bundleTypes: true,
|
|
outDirs: 'dist',
|
|
processor: 'ts',
|
|
tsconfigPath: './tsconfig.build.json',
|
|
}),
|
|
],
|
|
})
|