Skip to content

Requirement on cordova-serve #537

@erisu

Description

@erisu

Looking at how cordova-serve is used in this package, I'd question if it would make more sense to drop this dependency entirely.

cordova-serve is not updated regularly and there could be better or modern alternatives for serving web content.

By moving away from this dependency, you'd gain:

  • Finer control over the serving logic and choosing which dependencies you prefer to provide.
  • Regular updates for the actual seving npm packages.
  • Reduced footprint by only including the code that's actually needed.

Possible Approach

This package could replace cordova-serve with a minimal setup by:

  1. Installing dependencies that was used in cordova-serve:

    • express@4.21.2
    • compression@1.8.1
    • open@8.4.2
  2. Creating its own express app with just the necessary functionality.

The only logic that would need to be copied from cordova-serve is:

Proof of Concept

I had created a test branch to confirm the above approach but wanted to get your opinion if you find this beneficial.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions