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 invalid exports by changing package type #16

Closed
wants to merge 5 commits into from

Conversation

timolins
Copy link
Member

📓 What's in there?

Our build output didn't align with what's stated in the package.json. This change, makes the ESM file the default, and outputs ".cjs" for CommonJS. tsup docs for reference.

This also aligns with how it works in Web Analytics.

image

Copy link

vercel bot commented Nov 22, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
speed-insights-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2023 9:31am
speed-insights-remix ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2023 9:31am
speed-insights-sveltekit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 27, 2023 9:31am

feugy
feugy previously approved these changes Nov 22, 2023
Copy link
Member

@feugy feugy left a comment

Choose a reason for hiding this comment

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

I quickly fixed the test issue: since the package is now a module, cjs files must be clearly identified.

@feugy feugy dismissed their stale review November 23, 2023 08:58

Oups, I forgot type:module was not the correct approach.

Apparently, newer version of Next.js pages dir does not support external ESM modules by default
@feugy
Copy link
Member

feugy commented Nov 28, 2023

Closing in favor of #17

Thanks for the work done!

@feugy feugy closed this Nov 28, 2023
@tobiaslins tobiaslins deleted the fix-package-import branch December 7, 2023 11:20
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