Skip to content

Commit

Permalink
chore: Remove need to manually specify external dependencies
Browse files Browse the repository at this point in the history
Imports and uses peerDependencies from package.json to determine external dependencies.
  • Loading branch information
AVGVSTVS96 committed Aug 10, 2024
1 parent 8e12d77 commit 6914d78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineConfig } from 'tsup';
import { peerDependencies } from './package.json';

export default defineConfig((options) => {
const dev = !!options.watch;
Expand All @@ -11,6 +12,6 @@ export default defineConfig((options) => {
clean: true,
minify: !dev,
injectStyle: true,
external: ['react', 'react-dom'],
external: [...Object.keys(peerDependencies)],
};
});

0 comments on commit 6914d78

Please sign in to comment.