Merged
Conversation
README.md
Outdated
Contributor
Author
There was a problem hiding this comment.
might change the meaning
Is that true? Or did you mean "change the structure of the sentence"?
Collaborator
There was a problem hiding this comment.
change the structure should be fine.
Closed
longlho
pushed a commit
that referenced
this pull request
Apr 27, 2020
longlho
pushed a commit
that referenced
this pull request
Apr 27, 2020
longlho
pushed a commit
that referenced
this pull request
Apr 27, 2020
longlho
pushed a commit
that referenced
this pull request
Apr 27, 2020
Revamp build process and separate CLDR data
longlho
pushed a commit
that referenced
this pull request
Apr 27, 2020
Fix bug with month and year diff calculation
longlho
added a commit
that referenced
this pull request
Mar 16, 2026
…k, Rollup, esbuild, Rspack Create `@formatjs/unplugin` as a universal build plugin powered by unplugin that provides the same FormatJS AST transformations across all major bundlers with a single codebase. The core `transform.ts` (451 lines) is moved from `@formatjs/vite-plugin` into this new package. `@formatjs/vite-plugin` becomes a thin re-export from `@formatjs/unplugin/vite` for backward compatibility. Key changes: - New `packages/unplugin/` with entry points for vite, webpack, rollup, esbuild, rspack - `packages/vite-plugin/` simplified to 2-line re-export wrapper - 51 unit tests (47 transform + 4 factory tests) - Full documentation with usage examples for all 5 bundlers - Added `ESNEXT_SKIP_LIB_CHECK_TSCONFIG` for packages depending on unplugin - Added `skipLibCheck` to vitest test tsconfig for transitive type compatibility Closes UPCOMING.md item #1 (Vite Plugin Adoption). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merged
6 tasks
longlho
added a commit
that referenced
this pull request
Mar 16, 2026
…k, Rollup, esbuild, Rspack Create `@formatjs/unplugin` as a universal build plugin powered by unplugin that provides the same FormatJS AST transformations across all major bundlers with a single codebase. The core `transform.ts` (451 lines) is moved from `@formatjs/vite-plugin` into this new package. `@formatjs/vite-plugin` becomes a thin re-export from `@formatjs/unplugin/vite` for backward compatibility. Key changes: - New `packages/unplugin/` with entry points for vite, webpack, rollup, esbuild, rspack - `packages/vite-plugin/` simplified to 2-line re-export wrapper - 51 unit tests (47 transform + 4 factory tests) - Full documentation with usage examples for all 5 bundlers - Added `ESNEXT_SKIP_LIB_CHECK_TSCONFIG` for packages depending on unplugin - Added `skipLibCheck` to vitest test tsconfig for transitive type compatibility Closes UPCOMING.md item #1 (Vite Plugin Adoption). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
longlho
added a commit
that referenced
this pull request
Mar 16, 2026
…ollup, esbuild, Rspack (#6096) ## Summary - Create `@formatjs/unplugin` — a universal build plugin powered by [unplugin](https://github.com/unjs/unplugin) that provides FormatJS AST transformations (ID generation, description removal, AST pre-parsing) across all major bundlers with a single codebase - `@formatjs/vite-plugin` becomes a thin 2-line re-export from `@formatjs/unplugin/vite` for backward compatibility — zero breaking changes for existing users - Full documentation with usage examples for Vite, Webpack, Rollup, esbuild, and Rspack Closes UPCOMING.md item #1 (Vite Plugin Adoption: 689/week vs 276K for babel-plugin). ## What changed ### New: `packages/unplugin/` - `transform.ts` — core transform logic (moved from vite-plugin, 451 lines, unchanged) - `index.ts` — `createUnplugin` factory with `transformInclude` + `transform` hooks - `vite.ts`, `webpack.ts`, `rollup.ts`, `esbuild.ts`, `rspack.ts` — bundler entry points - `package.json` — exports for `.`, `./vite`, `./webpack`, `./rollup`, `./esbuild`, `./rspack`, `./transform` - 51 unit tests (47 transform + 4 factory) ### Updated: `packages/vite-plugin/` - `index.ts` → 2-line re-export from `@formatjs/unplugin/vite` - `transform.ts` → deleted (moved to unplugin) - `tests/` → deleted (moved to unplugin) - Integration tests stay and all 10 pass ### Build system - `tools/tsconfig.bzl` — added `ESNEXT_SKIP_LIB_CHECK_TSCONFIG` (unplugin's types import from all bundlers) - `tools/vitest.bzl` — added `skipLibCheck` to test tsconfig for transitive type compatibility ### Docs - New `docs/src/docs/tooling/unplugin.mdx` — full docs with all 5 bundler examples + migration guides - Updated `vite-plugin.mdx` — tip recommending unplugin for new projects - Updated `bundler-plugins.mdx` — added unplugin section with tabbed examples - Updated navigation tree ## Test plan - [x] `bazel test //packages/unplugin:unit_test` — 51 tests pass - [x] `bazel test //packages/unplugin:unit_test_typecheck_typecheck_test` — type-check passes - [x] `bazel test //packages/vite-plugin/integration-tests:integration_test` — 10 integration tests pass (backward compat) - [x] `bazel test //docs:docs_metadata_test` — docs metadata up to date - [x] `pnpm t` — 484/487 pass (3 pre-existing failures in react-intl/vue-intl sandbox resolution, confirmed on clean main) - [x] All pre-commit hooks pass (format, lint, commitlint) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Just some cleanup.