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

feat: Add full ESM support via an import export condition #1115

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

amannn
Copy link
Owner

@amannn amannn commented Jun 11, 2024

We currently support ESM partially. This PR investigates switching to bunchee to enable full ESM while supporting:

  1. 'use client' directives split bundles
  2. Separate development/production build for ESM to avoid process.env.NODE_ENV checks
  3. CJS/ESM dual build

TODO

Release docs

  • Might have to update vitest to latest in case dev condition is not applied

Fixes #1153

Copy link

vercel bot commented Jun 11, 2024

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

Name Status Preview Comments Updated (UTC)
next-intl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 26, 2024 4:48pm
next-intl-example-app-router ❌ Failed (Inspect) Jun 26, 2024 4:48pm
next-intl-example-app-router-without-i18n-routing ❌ Failed (Inspect) Jun 26, 2024 4:48pm

# Conflicts:
#	packages/next-intl/package.json
#	packages/next-intl/rollup.config.mjs
#	packages/use-intl/package.json
#	packages/use-intl/rollup.config.mjs
#	pnpm-lock.yaml
#	scripts/getBuildConfig.mjs
# Conflicts:
#	packages/next-intl/package.json
#	packages/use-intl/package.json
#	pnpm-lock.yaml
# Conflicts:
#	package.json
#	packages/next-intl/package.json
#	packages/use-intl/package.json
#	pnpm-lock.yaml
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.

Importing createMiddleware() doesn't work as the tutorial suggests in type:module packages
1 participant