mirror of
https://github.com/different-ai/openwork
synced 2026-04-25 17:15:34 +02:00
fix(ui): split tsup builds to avoid d.ts races (#1437)
This commit is contained in:
@@ -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",
|
||||
|
||||
23
packages/ui/tsup.config.react.ts
Normal file
23
packages/ui/tsup.config.react.ts
Normal 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"
|
||||
},
|
||||
})
|
||||
23
packages/ui/tsup.config.solid.ts
Normal file
23
packages/ui/tsup.config.solid.ts
Normal 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"
|
||||
},
|
||||
})
|
||||
@@ -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"
|
||||
},
|
||||
},
|
||||
])
|
||||
Reference in New Issue
Block a user