Skip to content

chore(mini): single build output, consolidate scripts - #358

Merged
iambumblehead merged 3 commits into
mainfrom
chore/build
Oct 24, 2026
Merged

iambumblehead merged 3 commits into
mainfrom
chore/build

Conversation

@tommy-mitchell

@tommy-mitchell tommy-mitchell commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Following up on #356 (comment)

This PR cleans up the minification step to only output a single .js file, and consolidates some package.json scripts/GitHub Actions workflows to make it clearer when each step happens.

Brings us down to ~20kb install size:

20.4 kB  5 Files

11.6 kB  src/esmock.js
 4.4 kB  README.md
 2.5 kB  src/esmock.d.ts
 1.1 kB  package.json
  750 B  LICENSE

 8.6 kB  Tarball

@iambumblehead

Copy link
Copy Markdown
Owner

something esbuild has been doing is, bundling resolvewithplus, so that esmock does not have any dependencies. It would be great to keep esmock as 0-dependencies.

@iambumblehead

Copy link
Copy Markdown
Owner

oh okay I see that is still being done...it is moved to the root package.json

@iambumblehead

Copy link
Copy Markdown
Owner

looks good... cloning it here to take a closer

@iambumblehead

Copy link
Copy Markdown
Owner

previously test-ci would test the minified scripts; it was testing exactly the sources that would be published

@tommy-mitchell

Copy link
Copy Markdown
Collaborator Author

previously test-ci would test the minified scripts; it was testing exactly the sources that would be published

I see, it was a little confusing having the minification step be implicit in testing CI. I can rework it so we're still testing the output though.

@iambumblehead

Copy link
Copy Markdown
Owner

looks good

@iambumblehead

Copy link
Copy Markdown
Owner

previously test-ci would test the minified scripts; it was testing exactly the sources that would be published

I see, it was a little confusing having the minification step be implicit in testing CI. I can rework it so we're still testing the output though.

there were a few cases where the minified version was missing something or had some issue and CI did catch those, but because the loader is gone it might mostly be a non-issue now

@iambumblehead

Copy link
Copy Markdown
Owner

missing esmockCache is failing the tests for mini:src... I don't know why previous branches did not fail the same tests. Maybe the esmockCache tests could be removed or skipped.

Or esmockCache could be defined on the 'esmock' exports so that it could be handled inside the test through the single 'esmock' import.

@tommy-mitchell

Copy link
Copy Markdown
Collaborator Author

missing esmockCache is failing the tests for mini:src... I don't know why previous branches did not fail the same tests. Maybe the esmockCache tests could be removed or skipped.

Yeah, I changed it to grab from the global cache variable since that's already defined

@tommy-mitchell

Copy link
Copy Markdown
Collaborator Author

I don't know why previous branches did not fail the same tests.

The pretest minification step just build the minified esbuild.js, but it didn't delete the other source files. That's why it still passed :p

@iambumblehead

Copy link
Copy Markdown
Owner

should we merge?

@tommy-mitchell

Copy link
Copy Markdown
Collaborator Author

if you’re comfortable with the changes!

@iambumblehead

Copy link
Copy Markdown
Owner

okay will merge after the check passes

@iambumblehead
iambumblehead merged commit 9eeadaa into main Oct 24, 2026
9 checks passed
@iambumblehead
iambumblehead deleted the chore/build branch October 24, 2026 20:48
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.

3 participants