bundle tsup client

This commit is contained in:
Oleksandr Honcharov 2024-06-10 22:19:36 +03:00
parent 1923cb7a04
commit 19fdebd986
6 changed files with 5233 additions and 6508 deletions

View File

@ -1,16 +0,0 @@
import { build } from 'esbuild'
import { umdWrapper } from 'esbuild-plugin-umd-wrapper'
build({
entryPoints: ['./src/index.ts'],
bundle: true,
format: 'umd',
platform: 'node',
outdir: './dist',
plugins: [
umdWrapper({
libraryName: 'fw',
}),
],
}).then(() => {
console.log('Successfully build. Executing types build...')
})

View File

@ -2,12 +2,11 @@
"name": "rage-fw-client",
"version": "0.0.9-alpha.0",
"main": "dist/index.js",
"type": "module",
"files": [
"dist/**/*"
],
"scripts": {
"build": "node --es-module-specifier-resolution=node build.js && pnpm types",
"build": "tsup && pnpm types",
"types": "dts-bundle-generator --config dts.config.json"
},
"dependencies": {

View File

@ -1,9 +1,29 @@
{
"extends": "../tsconfig.json",
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Base",
"exclude": [
"node_modules"
],
"compilerOptions": {
"incremental": true,
"composite": false,
"target": "ES2022",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"moduleDetection": "auto",
"module": "CommonJS",
"resolveJsonModule": true,
"declaration": false,
"declarationMap": false,
"sourceMap": false,
"downlevelIteration": false,
"inlineSourceMap": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"typeRoots": [
"@ragempcommunity/types-client"
],
"baseUrl": "./src"
]
}
}

11
client/tsup.config.ts Normal file
View File

@ -0,0 +1,11 @@
import { defineConfig } from 'tsup'
export default defineConfig({
entry: ['src/index.ts'],
outDir: './dist',
format: ['cjs'],
noExternal: ['rage-rpc'],
splitting: false,
sourcemap: false,
clean: true,
})

View File

@ -8,8 +8,7 @@
"@ragempcommunity/types-client": "^2.1.8",
"@ragempcommunity/types-server": "^2.1.8",
"dts-bundle-generator": "^9.5.1",
"esbuild": "^0.21.5",
"esbuild-plugin-umd-wrapper": "^2.0.0",
"tsup": "^8.1.0",
"lerna": "^8.1.3",
"prettier": "^3.3.1",
"rage-rpc": "^0.4.0",

11682
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff