diff --git a/src/HolyProgress.ts b/src/HolyProgress.ts index 0442a3b..109b614 100644 --- a/src/HolyProgress.ts +++ b/src/HolyProgress.ts @@ -127,7 +127,7 @@ export class HolyProgress { this.removeBarFromDOM(); next(); }, this.settings.speed); - + this.removeSpinnerFromDOM(); }, this.settings.speed); } else { diff --git a/tsup.config.ts b/tsup.config.ts index 683a46b..916ffe2 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -1,10 +1,20 @@ -import { Options } from 'tsup'; -export const tsup: Options = { - target: 'es6', +import { defineConfig } from "tsup"; +import { peerDependencies } from "./package.json"; + +const externalDependencies = peerDependencies + ? Object.keys(peerDependencies) + : []; + +export default defineConfig({ + entry: ["src/index.tsx"], + format: ["cjs", "esm"], + target: ["es6"], + sourcemap: false, clean: true, dts: true, - entry: ['src/index.tsx'], + external: externalDependencies, + minify: true, + treeshake: true, keepNames: true, - sourcemap: true, - format: ['cjs', 'esm'], -}; + jsxFactory: "automatic", +});