fix(ui): split tsup builds to avoid d.ts races (#1437)

This commit is contained in:
Pascal André
2026-04-13 20:40:32 +02:00
committed by GitHub
parent 6ab6388a8d
commit 1196827391
4 changed files with 47 additions and 47 deletions

View File

@@ -20,7 +20,7 @@
"README.md"
],
"scripts": {
"build": "tsup"
"build": "tsup --config tsup.config.react.ts && tsup --config tsup.config.solid.ts"
},
"dependencies": {
"@paper-design/shaders": "0.0.72",

View File

@@ -0,0 +1,23 @@
import { defineConfig } from "tsup"
export default defineConfig({
entry: {
"react/index": "src/react/index.ts",
},
tsconfig: "./tsconfig.react.json",
format: ["esm"],
dts: {
tsconfig: "./tsconfig.react.json",
},
clean: true,
target: "es2022",
platform: "browser",
sourcemap: false,
splitting: false,
treeshake: true,
external: ["react", "react/jsx-runtime"],
esbuildOptions(options) {
options.jsx = "automatic"
options.jsxImportSource = "react"
},
})

View File

@@ -0,0 +1,23 @@
import { defineConfig } from "tsup"
export default defineConfig({
entry: {
"solid/index": "src/solid/index.ts",
},
tsconfig: "./tsconfig.solid.json",
format: ["esm"],
dts: {
tsconfig: "./tsconfig.solid.json",
},
clean: false,
target: "es2022",
platform: "browser",
sourcemap: false,
splitting: false,
treeshake: true,
external: ["solid-js", "solid-js/jsx-runtime"],
esbuildOptions(options) {
options.jsx = "automatic"
options.jsxImportSource = "solid-js/h"
},
})

View File

@@ -1,46 +0,0 @@
import { defineConfig } from "tsup"
export default defineConfig([
{
entry: {
"react/index": "src/react/index.ts",
},
tsconfig: "./tsconfig.react.json",
format: ["esm"],
dts: {
tsconfig: "./tsconfig.react.json",
},
clean: true,
target: "es2022",
platform: "browser",
sourcemap: false,
splitting: false,
treeshake: true,
external: ["react", "react/jsx-runtime"],
esbuildOptions(options) {
options.jsx = "automatic"
options.jsxImportSource = "react"
},
},
{
entry: {
"solid/index": "src/solid/index.ts",
},
tsconfig: "./tsconfig.solid.json",
format: ["esm"],
dts: {
tsconfig: "./tsconfig.solid.json",
},
clean: false,
target: "es2022",
platform: "browser",
sourcemap: false,
splitting: false,
treeshake: true,
external: ["solid-js", "solid-js/jsx-runtime"],
esbuildOptions(options) {
options.jsx = "automatic"
options.jsxImportSource = "solid-js/h"
},
},
])