Skip to content

automate bundle#322

Merged
RomKadria merged 1 commit intomasterfrom
feature/romka/automate-bundle
Apr 27, 2026
Merged

automate bundle#322
RomKadria merged 1 commit intomasterfrom
feature/romka/automate-bundle

Conversation

@RomKadria
Copy link
Copy Markdown
Collaborator

@RomKadria RomKadria commented Apr 27, 2026

Summary

Derive rollup external list automatically from package.json instead of maintaining a hardcoded duplicate list.

Why

Previously, the external array in rollup.config.js was a hardcoded list (['@mondaydotcomorg/api', 'zod', 'zod-to-json-schema']). This meant every time a dependency was added to package.json, it also had to be manually added to the rollup config — and forgetting to do so would silently bundle it instead of externalizing it (this was already the case for axios and jsonwebtoken).

Now external is derived from pkg.dependencies and pkg.peerDependencies, so new dependencies are automatically externalized with no extra step.

Note on createRequire

We use createRequire to load package.json because this project uses Rollup 2, which doesn't support JSON import assertions (import pkg from './package.json' with { type: 'json' }). This is the standard Node.js workaround for importing JSON in ES modules.

@RomKadria RomKadria merged commit a31c016 into master Apr 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants