Skip to content

fix(create-vc-app): make generated dynamic modules build - #413

Merged
maksimzinchuk merged 2 commits into
mainfrom
fix/dynamic-module-template-build
Nov 16, 2026
Merged

maksimzinchuk merged 2 commits into
mainfrom
fix/dynamic-module-template-build

Conversation

@ivan-kalachikov

Copy link
Copy Markdown
Contributor

Summary

A project generated with npx @vc-shell/create-vc-app <name> --type dynamic-module (2.11.0) does not build. yarn build fails for three reasons, each fixed here:

  1. Missing dependencies. The template's vite.config.mts imports @vc-shell/mf-module, but the template package.json declares neither it nor its peer @vitejs/plugin-vue. Both are added; updateBoilerplatePkgVersions keeps their versions in sync on release.
  2. Crash without options. The template calls getDynamicModuleConfiguration() with no arguments, and the config reads options.entry: TypeError: Cannot read properties of undefined (reading 'entry'). options now defaults to {} in getDynamicModuleConfiguration and dynamicModuleConfiguration.
  3. No build entry. The template has no index.html, so Vite stops with Could not resolve entry module "index.html". When the project root has no index.html, build.rollupOptions.input is now the module entry (entry, default ./src/modules/index.ts). Projects that ship an index.html keep Vite's default, and an explicit build.rollupOptions.input in the options still wins through mergeConfig.

Test Plan

  • yarn check passes locally — not run in full; ESLint (--max-warnings=0) and Prettier pass on the changed files, vue-tsc --noEmit passes in cli/create-vc-app, tsc --noEmit passes in packages/mf-module
  • yarn workspace @vc-shell/framework run test passes — not run, the framework is untouched
  • Manual UI verification in Storybook or vendor-portal app (if applicable) — not applicable
  • packages/mf-module tests pass; the new tests (build input with and without index.html, a custom entry, no options) fail on main
  • cli/create-vc-app tests pass; the new test (every package vite.config.mts imports, plus the mf-module peers, is declared) fails on main
  • End to end: a module generated by this branch's CLI, installed from npm, fails yarn build with the published @vc-shell/mf-module@2.11.0 and builds dist/mf/remoteEntry.js once that package's dist is replaced with this branch's build

These two packages' tests are not part of CI (CI / test runs only the framework suite); locally they need @vc-shell/mf-config and @vc-shell/config-generator built first.

Breaking Changes

None. The build input changes only for projects without an index.html, whose builds failed before.

Checklist

  • PR title follows Conventional Commits (feat:, fix:, docs:, refactor:, chore:, test:, perf:, ci:, build:, style:, or revert:)
  • Documentation updated (README.md / *.docs.md) — no documented behaviour changes
  • Tests added or updated
  • No new ESLint warnings (yarn lint:check)

A project generated with `--type dynamic-module` failed `yarn build`:

- the template's vite.config imports @vc-shell/mf-module, but the package
  (and its @vitejs/plugin-vue peer) was not in the template's package.json;
- the template calls getDynamicModuleConfiguration() with no arguments,
  which crashed on `options.entry`; options now default to {};
- the template has no index.html, so Vite had no build entry. When the
  project ships no index.html, the module entry is now the build input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

📦 Preview published for commit d0f126a

Install the preview with dist-tag:

npm install @vc-shell/framework@pr-413

Or pin to the exact commit:

npm install @vc-shell/framework@2.11.0-pr413.d0f126a

Published packages (dist-tag pr-413, version 2.11.0-pr413.d0f126a):

  • @vc-shell/framework
  • @vc-shell/api-client-generator
  • @vc-shell/create-vc-app
  • @vc-shell/config-generator
  • @vc-shell/migrate
  • @vc-shell/ts-config
  • @vc-shell/mf-config
  • @vc-shell/mf-host
  • @vc-shell/mf-module
  • @vc-shell/vc-app-skill

@ivan-kalachikov
ivan-kalachikov marked this pull request as ready for review November 11, 2026 18:38
@maksimzinchuk
maksimzinchuk merged commit 40b98b5 into main Nov 16, 2026
12 checks passed
@maksimzinchuk
maksimzinchuk deleted the fix/dynamic-module-template-build branch November 16, 2026 10:56
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.

2 participants