Skip to content

fix(docs): enhance decorator transpilation#177

Merged
coryrylan merged 1 commit into
mainfrom
topic-doc-fix
Jul 9, 2026
Merged

fix(docs): enhance decorator transpilation#177
coryrylan merged 1 commit into
mainfrom
topic-doc-fix

Conversation

@coryrylan

@coryrylan coryrylan commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator
  • Updated the transpileDecorators function to accept an options parameter for enabling experimental decorators.
  • Added a new export pattern for plugins in package.json to support dynamic imports.
  • Integrated the updated decorator transpilation in the Eleventy configuration.

Summary by CodeRabbit

  • New Features
    • Added support for a new plugin subpath, making plugin imports cleaner and more direct.
    • Enabled decorator syntax handling in the site’s build pipeline, improving compatibility for code that uses decorators.

- Updated the `transpileDecorators` function to accept an options parameter for enabling experimental decorators.
- Added a new export pattern for plugins in `package.json` to support dynamic imports.
- Integrated the updated decorator transpilation in the Eleventy configuration.

Signed-off-by: Cory Rylan <crylan@nvidia.com>
@coryrylan coryrylan requested a review from johnyanarella July 9, 2026 16:24
@coryrylan coryrylan self-assigned this Jul 9, 2026
@github-actions github-actions Bot added scope(internals) scope(docs) dependencies Pull requests that update a dependency file labels Jul 9, 2026
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 49501013-8e1b-4923-ba83-39fadb645d84

📥 Commits

Reviewing files that changed from the base of the PR and between 77117a1 and 974abca.

📒 Files selected for processing (3)
  • projects/internals/vite/package.json
  • projects/internals/vite/src/plugins/decorators.js
  • projects/site/eleventy.config.js

📝 Walkthrough

Walkthrough

The transpileDecorators Vite plugin now accepts an experimentalDecorators option that configures esbuild's tsconfigRaw compiler options. The plugin is exposed via a new package.json exports subpath, and the Eleventy site build now imports and enables it with experimentalDecorators set to true.

Changes

Experimental decorators support

Layer / File(s) Summary
Plugin option and export
projects/internals/vite/src/plugins/decorators.js, projects/internals/vite/package.json
transpileDecorators now accepts an { experimentalDecorators } option, passing tsconfigRaw compiler options (experimentalDecorators, useDefineForClassFields) to transformWithEsbuild when enabled; package.json adds an exports subpath for ./plugins/*.js.
Eleventy site Vite build wiring
projects/site/eleventy.config.js
Imports transpileDecorators from the new export path and adds it to the Vite build.rolldownOptions.plugins list with experimentalDecorators: true.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main change: improving decorator transpilation support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch topic-doc-fix

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

projects/site/eleventy.config.js

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.


Comment @coderabbitai help to get the list of available commands.

@coryrylan coryrylan merged commit a08584b into main Jul 9, 2026
14 checks passed
@coryrylan coryrylan deleted the topic-doc-fix branch July 9, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file scope(docs) scope(internals)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants