refactor: remove fast-element sideEffects metadata#7493
Merged
janechu merged 2 commits intoreleases/fast-element-v3from Apr 24, 2026
Merged
refactor: remove fast-element sideEffects metadata#7493janechu merged 2 commits intoreleases/fast-element-v3from
janechu merged 2 commits intoreleases/fast-element-v3from
Conversation
a404d23 to
70790c9
Compare
70becf1 to
1fd9892
Compare
70790c9 to
7136abc
Compare
1fd9892 to
0589311
Compare
7136abc to
27e9651
Compare
0589311 to
ebe87ab
Compare
27e9651 to
48ab602
Compare
ebe87ab to
e9ea204
Compare
48ab602 to
bd5d9fd
Compare
e9ea204 to
07c4af0
Compare
5 tasks
bd5d9fd to
9f05f56
Compare
07c4af0 to
2187b1c
Compare
9f05f56 to
85c2295
Compare
2187b1c to
5279371
Compare
85c2295 to
108f340
Compare
5279371 to
01b69b8
Compare
108f340 to
cf5f14e
Compare
01b69b8 to
7cfeee6
Compare
janechu
added a commit
that referenced
this pull request
Apr 24, 2026
# Pull Request ## 📖 Description Adds a new **Declarative HTML** documentation section to the 3.x docs site with four pages covering the full declarative template authoring workflow: - **Overview** — Purpose of declarative templates, when to use them, a hello world example, and comparison with imperative `html` tagged templates. - **Writing f-templates** — Template syntax including content/attribute/boolean/event bindings, directives (`f-when`, `f-repeat`, `f-ref`, `f-slotted`, `f-children`), dot-notation paths, execution context access (`$e`, `$c`), and expression limitations. - **Defining Elements** — `TemplateElement` registration, `templateOptions: "defer-and-hydrate"`, lifecycle callbacks (`config()`), element configuration (`options()`), `observerMap` and `attributeMap` usage. - **Server-Side Rendering** — The renderer-agnostic SSR contract, hydration flow, Declarative Shadow DOM output, state propagation, and `@microsoft/fast-build` CLI usage. Also adds cross-references from `packages/fast-element/README.md` and `DECLARATIVE_HTML.md` to the new docs. Based on the declarative template features from PRs #7490, #7491, #7492, and #7493. ## 📑 Test Plan - Website builds successfully with `npm run build -w sites/website` - All four pages render correctly in the 11ty output - `npm run checkchange` passes (no change files needed for docs-only changes to the website) ## ✅ Checklist ### General - [x] I have included a change request file using `$ npm run change` - [ ] I have added tests for my changes. - [x] I have tested my changes. - [x] I have updated the project documentation to reflect my changes. - [x] I have read the [CONTRIBUTING](https://github.com/microsoft/fast/blob/main/CONTRIBUTING.md) documentation and followed the [standards](https://github.com/microsoft/fast/blob/main/CODE_OF_CONDUCT.md#our-standards) for this project.
cf5f14e to
1284755
Compare
92b0074 to
5cf96a6
Compare
Base automatically changed from
copilot/pr3-declarative-template-bridge
to
releases/fast-element-v3
April 24, 2026 22:05
Make the declarative runtime lazy, convert debug.js to an explicit value-based entrypoint, and flip @microsoft/fast-element to sideEffects false after the remaining setup-only imports are removed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5cf96a6 to
e400d23
Compare
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.
Pull Request
📖 Description
This draft removes the remaining packaging-time side-effect assumptions from
@microsoft/fast-elementand flips the package to"sideEffects": false.declarative.jsimport-pure by moving declarative runtime setup behind a lazy internal runtime hookdebug.jsto an explicit value-based entrypoint while keepingindex.debug.jsandindex.rollup.debug.jsopt-in debug behavior intact👩�� Reviewer Notes
The main review points are
declarative/runtime.ts, the debug entrypoint changes, and the package metadata flip inpackage.json. The important question is whether the package is now honestly safe to ship withsideEffects: false; the changed tests/builds are aimed at that exact concern.📑 Test Plan
npm run build -w @microsoft/fast-elementnpm run test:chromium -w @microsoft/fast-elementnode build/biome-changed.mjsnode build/biome-changed.mjs checknpm run doc:ci -w @microsoft/fast-elementnpm run doc:exports:ci -w @microsoft/fast-elementnpm run test:playwright -w @microsoft/fast-element✅ Checklist
General
$ npm run change