From 33604a9d95962da10e7f508c6a4040d8656ce1a7 Mon Sep 17 00:00:00 2001 From: inokawa <48897392+inokawa@users.noreply.github.com> Date: Mon, 2 Dec 2024 12:29:15 +0900 Subject: [PATCH] Publish .jsx for SSR in Solid --- package.json | 1 + rollup.config.mjs | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/package.json b/package.json index 41a0bc68..8fd49104 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ }, "./solid": { "types": "./lib/solid/index.d.ts", + "solid": "./lib/solid/index.jsx", "import": "./lib/solid/index.mjs", "default": "./lib/solid/index.js" }, diff --git a/rollup.config.mjs b/rollup.config.mjs index 74f4eaa4..b5c56cff 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -134,6 +134,31 @@ export default [ ], external, }, + // solid (for SSR) + { + input: "src/solid/index.ts", + output: [ + { + file: pkg.exports["./solid"].solid, + format: "es", + sourcemap: true, + }, + ], + jsx: "preserve", + // FIXME: props._resizer call inside ListItem is unexpectedly treeshaked by rollup. + treeshake: false, + plugins: [ + typescript({ + tsconfig: "./tsconfig.json", + outDir: ".", + // declaration: true, + exclude: ["**/*.{spec,stories}.*"], + jsx: "preserve", + }), + // terserPlugin(), + ], + external, + }, // svelte { input: "src/core/index.ts",