Skip to content

Commit

Permalink
fix: work around semantic-release/npm plugin prepack issue
Browse files Browse the repository at this point in the history
There's an issue where the `npm` plugin for `semantic-release`
effectively runs `npm prepack` twice when `tarballDir` is set. Worse, if
the `tarballDir` is within the package directory and not excluded (by
`.npmignore`, for example) then the tarball from the first `prepack`
will end up inside the tarball for the second `prepack`, effectively
doubling the package size.

See semantic-release/npm#535
  • Loading branch information
cwillisf committed Sep 10, 2024
1 parent d34aac2 commit a5d298d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
[
'@semantic-release/npm',
{
tarballDir: 'pack'
// Do not set 'tarballDir' without considering this issue: https://github.com/semantic-release/npm/issues/535
}
],
[
Expand Down

0 comments on commit a5d298d

Please sign in to comment.