to avoid trying to minify while build (rollup) has not completed yet. This behaviour seems consistent, therefore the minified file was consistently applied on the **previous** src file. Most probably this does not affect already published files in npm, as the publisher very probably built at least once the version before publishing it (without modifying it in between), at which point npm re-runs the prepublish script, which minifies again the current src.