Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagejson- ^,~的区别 #24

Open
PleaseStartYourPerformance opened this issue Jun 24, 2021 · 0 comments
Open

Pagejson- ^,~的区别 #24

PleaseStartYourPerformance opened this issue Jun 24, 2021 · 0 comments

Comments

@PleaseStartYourPerformance
Copy link
Owner

举个栗子

"devDependencies": {
    "antd": "^3.1.4",
    "babel-plugin-import": "~1.1.0",
    "classnames": "2.2.5",
    "qs": "^6.3.0",
    "robe-ajax": "^1.0.1",
    "expect": "^1.20.2",
    "js-cookie": "^2.1.3",

 .......
}

(1)指定版本:比如"classnames": "2.2.5",表示安装2.2.5的版本

(2)波浪号~+指定版本:比如 "babel-plugin-import": "~1.1.0",表示安装1.1.x的最新版本(不低于1.1.0),但是不安装1.2.x,也就是说安装时不改变大版本号和次要版本号

(3)^+指定版本:比如 "antd": "^3.1.4",,表示安装3.1.4及以上的版本,但是不安装4.0.0,也就是说安装时不改变大版本号。

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

No branches or pull requests

1 participant