Skip to content

How to use plugins like serverless-domain-manager or serverless-offlineΒ #40

@ryanrubleycoates

Description

@ryanrubleycoates

I'm not sure if there is a documented or official way to do this, because most of the plugins end up installing original serverless as a dep, and some of them require 4.0.0 as well now.

What I ended up doing was:

  "devDependencies": {
    "osls": "^3.49.0",
    "serverless-domain-manager": "^8.0.0",
    "serverless-esbuild": "^1.55.0",
    "serverless-offline": "^14.4.0",
    "serverless-prune-plugin": "^2.1.0",
  },
  "overrides": {
    "serverless": "npm:osls"
  }

I think, according to https://docs.npmjs.com/cli/v11/configuring-npm/package-json#overrides and https://docs.npmjs.com/cli/v11/using-npm/package-spec#aliases this is officially supported and the correct way to go about it, but we so seldomly actually need to use the overrides section in package.json, I'm not really sure.

Comments, suggestions? Or close this issue as solved by the above, and I hope this helps others migrate to osls.

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