Skip to content

feat: workspace JS builds use .fastedge/build-config.js - #47

Merged
godronus merged 3 commits into
mainfrom
feat/component-imports
Oct 26, 2026
Merged

godronus merged 3 commits into
mainfrom
feat/component-imports

Conversation

@godronus

Copy link
Copy Markdown
Collaborator

Workspace builds ("entrypoint": "package") of a JS/TS project with .fastedge/build-config.js and @gcoredev/fastedge-sdk-js 2.7.0 or later now run fastedge-build --config <config> --output .fastedge-debug/app.wasm, so the config's entry point, static assets and Wasm components (2.7.0 component imports) are used. main isn't needed in that case.

  • Older SDKs or no config: the old <entry> <output> build.
  • File-mode builds are unchanged; if one fails in a project that has a config, the error is followed by a hint to run the workspace build instead.
  • entrypoint description and README updated.
  • 3 new tests in compilerSpawn.test.ts.

Checked end to end: the workspace build produced .fastedge-debug/app.wasm for the SDK's component-imports example; file mode showed the hint.

Copilot AI balanced review requested due to automatic review settings October 23, 2026 14:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused build-selection change preserves existing fallbacks, has targeted regression coverage, and has no unresolved review findings.

No open issues 🎉

What changed in this PR

Adds config-based JavaScript/TypeScript workspace builds so the debugger includes configured entry points, static assets, and Wasm components.

Changes:

  • Uses .fastedge/build-config.js for workspace builds with SDK 2.7.0 or later, preserving legacy and file-mode builds.
  • Adds a workspace-build hint after file-mode failures when a config exists.
  • Adds three regression tests and updates user-facing documentation.
File Description
src/​compiler/​jsBuild.ts Selects config-based builds by SDK version and adds failure guidance.
src/​compiler/​compilerSpawn.test.ts Tests config builds, older-SDK fallback, and file-mode behavior.
README.md Explains workspace builds and when to use them.
package.json Updates the entrypoint setting description.
context/​CHANGELOG.md Records the behavior change and validation.

Review effort: Balanced

@godronus
godronus merged commit 81ec00f into main Oct 26, 2026
9 checks passed
@godronus
godronus deleted the feat/component-imports branch October 26, 2026 14:31
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