From 6f53ada391b5367824e2c8fc6d67be462a137567 Mon Sep 17 00:00:00 2001 From: Dan6erbond Date: Tue, 25 May 2021 09:57:29 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Emit=20Typescript=20declaration?= =?UTF-8?q?=20files=20with=20Rollup=20Plugin=20Typescript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rollup.config.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 35c799b..01d69cc 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,6 +1,7 @@ import multiInput from "rollup-plugin-multi-input"; import packageJson from "./package.json"; import esbuild from "rollup-plugin-esbuild"; +import typescript from "@rollup/plugin-typescript"; const globals = { ...packageJson.dependencies, @@ -15,7 +16,14 @@ export default [ sourcemap: true, format: "cjs", }, - plugins: [esbuild(), multiInput()], + plugins: [ + esbuild(), + multiInput(), + typescript({ + emitDeclarationOnly: true, + sourceMap: false, + }), + ], external: [ ...Object.keys(globals), "@sveltejs/kit/assets/runtime/app/navigation",