Repository navigation
fix(create-vc-app): make generated dynamic modules build - #413
Merged
Merged
Conversation
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>
|
📦 Preview published for commit Install the preview with dist-tag: npm install @vc-shell/framework@pr-413Or pin to the exact commit: npm install @vc-shell/framework@2.11.0-pr413.d0f126aPublished packages (dist-tag
|
ivan-kalachikov
marked this pull request as ready for review
November 11, 2026 18:38
maksimzinchuk
approved these changes
Nov 16, 2026
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.
Summary
A project generated with
npx @vc-shell/create-vc-app <name> --type dynamic-module(2.11.0) does not build.yarn buildfails for three reasons, each fixed here:vite.config.mtsimports@vc-shell/mf-module, but the templatepackage.jsondeclares neither it nor its peer@vitejs/plugin-vue. Both are added;updateBoilerplatePkgVersionskeeps their versions in sync on release.getDynamicModuleConfiguration()with no arguments, and the config readsoptions.entry:TypeError: Cannot read properties of undefined (reading 'entry').optionsnow defaults to{}ingetDynamicModuleConfigurationanddynamicModuleConfiguration.index.html, so Vite stops withCould not resolve entry module "index.html". When the project root has noindex.html,build.rollupOptions.inputis now the module entry (entry, default./src/modules/index.ts). Projects that ship anindex.htmlkeep Vite's default, and an explicitbuild.rollupOptions.inputin the options still wins throughmergeConfig.Test Plan
yarn checkpasses locally — not run in full; ESLint (--max-warnings=0) and Prettier pass on the changed files,vue-tsc --noEmitpasses incli/create-vc-app,tsc --noEmitpasses inpackages/mf-moduleyarn workspace @vc-shell/framework run testpasses — not run, the framework is untouchedpackages/mf-moduletests pass; the new tests (build input with and withoutindex.html, a custom entry, no options) fail onmaincli/create-vc-apptests pass; the new test (every packagevite.config.mtsimports, plus the mf-module peers, is declared) fails onmainyarn buildwith the published@vc-shell/mf-module@2.11.0and buildsdist/mf/remoteEntry.jsonce that package'sdistis replaced with this branch's buildThese two packages' tests are not part of CI (
CI / testruns only the framework suite); locally they need@vc-shell/mf-configand@vc-shell/config-generatorbuilt first.Breaking Changes
None. The build input changes only for projects without an
index.html, whose builds failed before.Checklist
feat:,fix:,docs:,refactor:,chore:,test:,perf:,ci:,build:,style:, orrevert:)README.md/*.docs.md) — no documented behaviour changesyarn lint:check)