Cannot add URLs as dependencies in custom cli plugin #1177
Closed
Description
Version
3.0.0-beta.6
Steps to reproduce
In a new vue-cli-plugin, add to generator.js:
module.exports = (api, options) => {
api.extendPackage({
dependencies: { 'my-lib': 'https://bitbucket.org/user/my-lib.git#semver:^1.0.0' }
})
}
Then invoke the plugin on a vue-cli 3 project.
What is expected?
Dependencies should be added to package.json, whether they are defined as semver, URL, or anything valid (see: https://docs.npmjs.com/files/package.json#dependencies)
What is actually happening?
A warning "invalid version range for dependency" is displayed in the console but the dependency merge is skipped.