Conversation
…ries Parcel reads package.json engines and, seeing only engines.node, built the extension for a node target instead of the browser target plasmo passes as its default, which failed with "Failed to resolve '../../popup.tsx'". Declaring engines.browsers restores plasmo's intended chrome-mv3 target. Fixes MODSetter#506
|
@dualfroz is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe browser extension package metadata now declares support for the latest Chrome version. ChangesBrowser Compatibility
Priority: ➖ Normal Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The extension metadata restores the intended browser target and entry resolution, with no concrete merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Warning Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
With only
engines.nodeinpackage.json, Parcel builds the extension for a node target and fails withFailed to resolve '../../popup.tsx'.Declaring
engines.browsers, Plasmo's own MV3 default, restores the browser target. Same error as #506, reproduced on Linux, not tested on Windows.Refs #506
High-level PR Summary
This PR fixes a build issue where Parcel was incorrectly targeting Node.js instead of the browser environment for the browser extension. By adding an explicit
engines.browsersfield to thepackage.json, the build tool now correctly resolves the browser target and prevents module resolution failures.⏱️ Estimated Review Time: 5-15 minutes
💡 Review Order Suggestion
surfsense_browser_extension/package.jsonSummary by CodeRabbit