S
SolidJS•4w ago
siduck

js_jsx-runtime.js?v=848ce2cb' does not provide an export named 'Fragment'

I built a component lib and bundling it with tsdown, this is my config.
import { defineConfig } from "tsdown";

export default defineConfig({
entry: {
index: "index.ts",
preset: "../../packages/preset/index.ts",
},
format: ["esm"],
dts: true,
minify: true,
clean: true,
external: ["solid-js", "unocss"],
});
import { defineConfig } from "tsdown";

export default defineConfig({
entry: {
index: "index.ts",
preset: "../../packages/preset/index.ts",
},
format: ["esm"],
dts: true,
minify: true,
clean: true,
external: ["solid-js", "unocss"],
});
My tsconfig :
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Node",
"jsx": "preserve",
"jsxImportSource": "solid-js",
"strict": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"paths": {
"types/*": ["../types/*"]
}
},
"include": ["src", "global.d.ts"]
}
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Node",
"jsx": "preserve",
"jsxImportSource": "solid-js",
"strict": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"paths": {
"types/*": ["../types/*"]
}
},
"include": ["src", "global.d.ts"]
}
Am i missing anything?
No description
8 Replies
siduck
siduckOP•4w ago
ig i should use tsup
Madaxen86
Madaxen86•4w ago
Did you try to use tsup-preset-solid as in the official starter template for libs? https://github.com/solidjs-community/solid-lib-starter/blob/main/tsup.config.ts
GitHub
solid-lib-starter/tsup.config.ts at main · solidjs-community/solid...
SolidJS library starter template. Use it to create your own solid package. - solidjs-community/solid-lib-starter
siduck
siduckOP•4w ago
i'll try tsup not another package for this 😭 that tsupconfig itself looks so foreign and scary nvm lemme try i give up, cant there be a simple example with TSUP
siduck
siduckOP•4w ago
No description
siduck
siduckOP•4w ago
No description
siduck
siduckOP•4w ago
it works with this @Madaxen86 qwen ai to the rescue :0
Madaxen86
Madaxen86•4w ago
Otherwise I would have recommended to clone the starter lib and copy&paste your src dir. It has all setup. And afaik you could just replace the tsup defineConfig with tsdown's and it should work.
siduck
siduckOP•4w ago
it uses another package called tsup-preset-solid so much mental gymnastics

Did you find this page helpful?