Fix Vite build failure: suppress optional driver-memory dynamic import warning#316
Merged
hotlong merged 3 commits intocopilot/release-version-update-againfrom Jan 27, 2026
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ud vite build Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update action step in GitHub workflow
Fix Vite build failure: suppress optional driver-memory dynamic import warning
Jan 27, 2026
f08b23d
into
copilot/release-version-update-again
6 checks passed
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a Vite build failure in the examples/msw-react-crud example by suppressing warnings for an optional dynamic import. The runtime kernel attempts to dynamically import @objectstack/driver-memory as a backward compatibility fallback, but Vite treats this as an error during bundling even though the driver is explicitly imported and bundled elsewhere in the application.
Changes:
- Added a
rollupOptions.onwarnhandler to suppressUNRESOLVED_IMPORTwarnings specifically for@objectstack/driver-memory
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.
Vite build for
examples/msw-react-crudfails with unresolved import error for@objectstack/driver-memory. The runtime kernel uses an optional dynamic import for backward compatibility:When bundling, Vite encounters this in the transpiled output and treats it as an error, despite the driver being explicitly imported elsewhere in the application.
Changes
rollupOptions.onwarnhandler to suppressUNRESOLVED_IMPORTwarnings for@objectstack/driver-memorysrc/mocks/browser.ts:9Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.