From 758ab5cb4b2818f0104605b7c0401467de90500e Mon Sep 17 00:00:00 2001 From: Remi Bonnet Date: Fri, 5 Jul 2024 16:15:49 +0200 Subject: [PATCH] chore: update rollup type --- .gitignore | 3 ++- package.json | 5 +++-- rollup.config.mjs | 12 +++--------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 76add87..e5e5726 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules -dist \ No newline at end of file +dist +example \ No newline at end of file diff --git a/package.json b/package.json index 439bb21..37b75a3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,8 @@ { - "name": "qovery-react-xtermjs", + "name": "react-xtermjs", "version": "1.0.0", - "main": "/dist/index.js", + "main": "dist/index.js", + "types": "dist/index.d.ts", "scripts": { "build": "rollup -c", "test": "echo \"Error: no test specified\" && exit 1", diff --git a/rollup.config.mjs b/rollup.config.mjs index 5281299..17dd163 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -18,7 +18,6 @@ export default [ format: 'iife', name: 'version', plugins: [terser()], - exports: 'default', }, ], plugins: [ @@ -29,17 +28,12 @@ export default [ commonjs(), typescript({ tsconfig: './tsconfig.json', + declaration: true, + declarationDir: 'dist', + rootDir: 'src', }), postcss({ extensions: ['.css'], inject: true, extract: false }), ], external: ['react', 'react-dom', 'react/jsx-runtime'], }, - { - input: 'src/index.d.ts', - plugins: [dts()], - output: { - file: 'dist/index.d.ts', - format: 'es', - }, - }, ]