Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bundle browser build #1988

Merged
merged 3 commits into from
Jan 22, 2024
Merged

fix: bundle browser build #1988

merged 3 commits into from
Jan 22, 2024

Conversation

thepassle
Copy link
Contributor

No description provided.

@thepassle
Copy link
Contributor Author

thepassle commented Jan 21, 2024

Weird, looks like this breaks ts compat for some reason, and some failing tests. Weird, because locally the output seems to work fine in my unit tests and local storybook. Ill have to dive into that later, if someone else wants to continu this feel free to pick it up :)

tsup.config.ts Outdated
format: ['esm', 'cjs'],
outDir: './lib/browser',
bundle: true,
splitting: false,
sourcemap: true,
dts: true,
noExternal: Object.keys(packageJson.dependencies),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces an impossible state. noExternal, I imagine, takes precedence over external, and so we end up bundling ecosystem dependencies. Is that the case?

tsup.config.ts Outdated Show resolved Hide resolved
@kettanaito
Copy link
Member

kettanaito commented Jan 22, 2024

I've excluded the core modules from being bundled for the browser and browser tests pass locally. I believe that's the right direction here if we want the right TypeScript (and perhaps even runtime) behavior. I'd love to see if this change as-is gives any improvements on one of those fancy graphs of yours, @thepassle 🙏

@kettanaito
Copy link
Member

@thepassle, if you have a moment to look at this, I'd be thankful. I'd love to release this alongside #1990. Thanks!

@kettanaito kettanaito added this to the Performance milestone Jan 22, 2024
@kettanaito kettanaito added DX chore Tasks aimed at internal improvement performance labels Jan 22, 2024
@kettanaito kettanaito merged commit 1cbf615 into main Jan 22, 2024
11 checks passed
@kettanaito kettanaito deleted the fix/bundle-browser-build branch January 22, 2024 17:13
@kettanaito
Copy link
Member

Released: v2.1.4 🎉

This has been released in v2.1.4!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Tasks aimed at internal improvement DX performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants