Skip to content

Build script uses Unix-only cp, fails on Windows #15

@deepanshurajput0

Description

@deepanshurajput0

Description

The build script currently uses the Unix cp command, which causes the build to fail on Windows environments.

Because cp is not available on Windows, files (including icons) are not copied into dist/, and Chrome fails to load the extension due to missing assets.


Current build script

"build": "npm run sync-version && tsc && cp src/manifest.json dist/ && cp src/popup.html dist/ && cp -r src/icons dist/"

Environment

OS: Windows 11
Node.js: v22.12.0
npm: 10.9.0

Suggested fix

Replace the Unix-specific cp commands with a cross-platform alternative such as cpy:

"build": "npm run sync-version && tsc && cpy src/manifest.json dist/ && cpy src/popup.html dist/ && cpy src/icons/**/* dist/icons/"

This allows the project to build successfully on Windows while preserving existing behavior on macOS/Linux.


Result

  • Build works on Windows
  • Icons are correctly copied
  • Extension loads without manifest errors


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions