Skip to content

Commit

Permalink
fix: issue with spinner not show and update tsup to accept external l…
Browse files Browse the repository at this point in the history
…ibraries as peer dependency to not include inside bundle size
  • Loading branch information
pooooriya committed Nov 16, 2024
1 parent af294b2 commit 744e4cd
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/HolyProgress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,9 @@ export class HolyProgress {
progressBar.style.opacity = '0';
setTimeout(() => {
this.removeBarFromDOM();
this.removeSpinnerFromDOM();
next();
}, this.settings.speed);

this.removeSpinnerFromDOM();
}, this.settings.speed);
} else {
setTimeout(next, this.settings.speed);
Expand Down
24 changes: 17 additions & 7 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -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",
});

0 comments on commit 744e4cd

Please sign in to comment.