Skip to content

fix: resolve build errors and manifest issues#30

Open
AryaKoureshi wants to merge 2 commits into
urnetwork:mainfrom
AryaKoureshi:main
Open

fix: resolve build errors and manifest issues#30
AryaKoureshi wants to merge 2 commits into
urnetwork:mainfrom
AryaKoureshi:main

Conversation

@AryaKoureshi
Copy link
Copy Markdown

Fixes Windows build & npm audit/rollup errors

  • Replaced rm -rf with rimraf for Windows cross-compatibility.
  • Removed incompatible @crxjs/vite-plugin causing Rollup config errors and security audit warnings, returning manifest.config.ts to a plain export.
  • Fixed @samrum/vite-plugin-web-extension TypeScript signature conflict in Vite config.
  • Addressed public/ directory icon pathing pointing correctly to dist/ root in production builds.

- Replace rm with rimraf for Windows compatibility in build script

- Remove @crxjs/vite-plugin to fix rollup parse errors and audit issues

- Fix webExtension plugin TypeScript signature in Vite config

- Fix manifest icon paths for production build
Copilot AI review requested due to automatic review settings May 29, 2026 18:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Replaces the @crxjs/vite-plugin with @samrum/vite-plugin-web-extension for building the browser extension, updates the manifest configuration accordingly, and adjusts related tooling.

Changes:

  • Swap @crxjs/vite-plugin for @samrum/vite-plugin-web-extension in Vite config and manifest definition.
  • Update icon paths in manifest from public/logo.png to logo.png.
  • Replace rm -rf clean script with rimraf and add it as a devDependency.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.

File Description
vite.config.ts Replaces crx plugin with webExtension plugin and reorders plugins.
package.json Removes @crxjs/vite-plugin, adds @samrum/vite-plugin-web-extension and rimraf; updates clean script.
manifest.config.ts Drops defineManifest helper, exports plain object, updates icon paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread vite.config.ts Outdated
Comment thread vite.config.ts Outdated
Comment on lines +18 to +20
webExtension({ manifest } as any) as any,
react(),

Comment thread package.json Outdated
Comment thread manifest.config.ts Outdated
import pkg from "./package.json";

export default defineManifest({
export default {
Comment thread manifest.config.ts
default_locale: "en",
icons: {
48: "public/logo.png",
48: "logo.png",
@AryaKoureshi
Copy link
Copy Markdown
Author

Updated with follow-up fixes in 2c58c09.

Changes:

  • removed @samrum/vite-plugin-web-extension and the any casts
  • added a local manifest emitter for the generated background service worker
  • typed manifest.config.ts as chrome.runtime.ManifestV3
  • changed clean script to rimraf dist
  • updated Vite and lockfile

Verified locally:

  • npm run build passes
  • npm run lint passes
  • npm audit reports 0 vulnerabilities
  • dist/manifest.json points to existing popup, background, icon, and wasm files

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