{"id":10006405,"date":"2022-09-06T01:11:07","date_gmt":"2022-09-05T17:11:07","guid":{"rendered":"https:\/\/ityet.com\/?p=10006405"},"modified":"2022-09-06T01:11:07","modified_gmt":"2022-09-05T17:11:07","slug":"package-json%e4%b8%ad%e7%9a%84%e5%ad%97%e6%ae%b5%e8%af%a6%e8%a7%a3%e6%9d%a5%e8%87%aa%e4%ba%8e%e5%ae%98%e6%96%b9%e6%96%87%e6%a1%a3","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10006405","title":{"rendered":"package.json\u4e2d\u7684\u5b57\u6bb5\u8be6\u89e3(\u6765\u81ea\u4e8e\u5b98\u65b9\u6587\u6863)"},"content":{"rendered":"<p>\u6253\u5f00 npm \u7684\u5b98\u65b9\u6587\u6863  <a href=\"https:\/\/link.segmentfault.com\/?enc=E9laaipJ5Q0sblttwzazcw%3D%3D.vsu6OVKYkx4fHMtklvg1uXcPGax%2BVfUXetSCWINoOnM4kmHQupz9SRjAAxfi5TDQaT3ChSnOIoOIlv2SEk0gfA%3D%3D\" rel=\"nofollow\">npm Docs<\/a><\/p>\n<pre><code class=\"json\">{\n  \/\/\u53d1\u73b0\u4ee5\u4e0b\u768431\u4e2a\u5b57\u6bb5\u90fd\u662f\u5b98\u65b9\u7684\u6807\u51c6\n  &quot;name&quot;: &quot;vuex&quot;,   \/\/\u53d1\u5e03\u65f6\u5fc5\u987b\uff0c\u4e0d\u5f97\u548c\u73b0\u6709npm\u5305\u91cd\u540d,\u53ef\u4ee5\u901a\u8fc7 @xxx\/vuex \u52a0\u4e2a\u8303\u56f4\uff0c\u8303\u56f4\u53c2\u89c1 https:\/\/docs.npmjs.com\/cli\/v8\/using-npm\/scope\n  &quot;version&quot;: &quot;4.0.2&quot;, \/\/\u53d1\u5e03\u65f6\u5fc5\u987b\n  &quot;private&quot;: false, \/\/ \u662f\u5426\u79c1\u6709\uff0c\u5982\u679c\u8981\u53d1\u5e03\u516c\u5171\u5305\uff0c\u8fd9\u4e2a\u503c\u4e3atrue. \n  &quot;description&quot;: &quot;state management for Vue.js&quot;, \/\/\u5305\u7684\u7b80\u8981\u63cf\u8ff0\uff0c\n  &quot;keywords&quot;: [&quot;vue&quot;, &quot;vuex&quot;],  \/\/\u5173\u952e\u5b57\u641c\u7d22\uff0c\u6709\u52a9\u4e8e\u641c\u7d22\u53d1\u73b0\u5305\uff0c\n  &quot;homepage&quot;: &quot;https:\/\/github.com\/vuejs\/vuex#readme&quot;,  \/\/ \u5305\u7684\u4e3b\u9875url\uff0c\n  &quot;bugs&quot;: &quot;https:\/\/github.com\/vuejs\/vuex\/issues&quot;,  \/\/\u63d0issues\u7684\u5730\u5740\uff0c  \n  &quot;license&quot;: &quot;MIT&quot;,  \/\/\u8bb8\u53ef\u8bc1\n  &quot;author&quot;: &quot;Nicholas C. Zakas&quot;,  \/\/\u4f5c\u8005\n  &quot;contributors&quot;: [   \/\/\u4ee3\u7801\u8d21\u732e\u8005\n    {\n      &quot;name&quot;: &quot;Boris Cherny&quot;,\n      &quot;url&quot;: &quot;https:\/\/github.com\/bcherny&quot;,\n      &quot;githubUsername&quot;: &quot;bcherny&quot;\n    },\n    {\n      &quot;name&quot;: &quot;Lucian Buzzo&quot;,\n      &quot;url&quot;: &quot;https:\/\/github.com\/lucianbuzzo&quot;,\n      &quot;githubUsername&quot;: &quot;lucianbuzzo&quot;\n    },\n  ],\n  &quot;funding&quot;: {   \/\/\u6350\u8d60\u5730\u5740\n    &quot;type&quot;: &quot;opencollective&quot;,\n    &quot;url&quot;: &quot;https:\/\/opencollective.com\/typescript-eslint&quot;\n  },\n\n  \/\/\u5c06\u5305\u4f5c\u4e3a\u4f9d\u8d56\uff0c\u5b89\u88c5\u5230\u672c\u5730\u65f6\uff0c\u5305\u542b\u7684\u5185\u5bb9\u3002\u6709\u4e00\u4e9b\u4e0d\u6307\u5b9a\uff0c\u4e5f\u603b\u4f1a\u5305\u542b\u8fdb\u53bb\uff0c\u5982package.json\uff0cREADME\uff0cLICENSE\/LICENCE\uff0c\u672c\u6587\u4ef6\u4e2dmain\u5b57\u6bb5\u5f15\u7528\u7684\u6587\u4ef6\uff0c\u6709\u4e9b\u4e0d\u6307\u5b9a\uff0c\u603b\u4f1a\u88ab\u6392\u9664.npmrc\uff0cnode_modules\n  \/\/files\u4f18\u5148\u7ea7\u8f83\u9ad8\u3002\u4e0d\u80fd\u901a\u8fc7.npmignore\u548c.gitignore\u6392\u9664\u6389\u3002\n  &quot;files&quot;: [\n    &quot;dist&quot;,\n    &quot;types\/index.d.ts&quot;,\n    &quot;types\/helpers.d.ts&quot;,\n    &quot;types\/logger.d.ts&quot;,\n    &quot;types\/vue.d.ts&quot;\n  ],\n\n\n  &quot;main&quot;: &quot;dist\/vuex.cjs.js&quot;,    \/\/cjs \u6a21\u5757\u5f15\u7528\u7684\u5165\u53e3\uff0c \u6267\u884crequire(&quot;vuex&quot;)\u65f6\u8c03\u7528\u3002\n  &quot;browser&quot;: &quot;dist\/vuex.esm-browser.js&quot;, \/\/\u6d4f\u89c8\u5668\u7aef\u4f7f\u7528\n\n  &quot;bin&quot;: {    \/\/\u53ef\u6267\u884c\u6587\u4ef6\u8def\u5f84\uff0c\u4ed6\u4eec\u4f1a\u88ab\u6dfb\u52a0\u5230 \u73af\u5883\u53d8\u91cf\u7684PATH\u4e2d\u3002\u5728\u63a7\u5236\u53f0\u8fd0\u884c&gt;vite \u547d\u4ee4\u65f6\u8c03\u7528\u3002\n    &quot;vite&quot;: &quot;bin\/vite.js&quot;\n  },\n  &quot;man&quot;: &quot;&quot;,\n  &quot;directories&quot;: &quot;&quot;,\n  &quot;repository&quot;: {  \/\/\u4ee3\u7801\u4ed3\u5e93\u6240\u5728\u4f4d\u7f6e\n    &quot;type&quot;: &quot;git&quot;,\n    &quot;url&quot;: &quot;git+https:\/\/github.com\/vuejs\/vuex.git&quot;\n  },\n  &quot;scripts&quot;: {  \/\/\u6267\u884c\u811a\u672c\u547d\u4ee4\n    &quot;dev&quot;: &quot;vite&quot;,\n    &quot;build&quot;: &quot;vue-tsc --noEmit &amp;&amp; vite build&quot;,\n    &quot;test&quot;: &quot;vue-tsc --noEmit &amp;&amp; vite build --mode test&quot;,\n    &quot;preview&quot;: &quot;vite preview&quot;\n  },\n  &quot;config&quot;: {}\n    &quot;dependencies&quot;: {   \/\/\u751f\u4ea7\u73af\u5883\u4f9d\u8d56\u7684\u5305\uff0c\u4e0d\u8981\u628a\u5f00\u53d1\u73af\u5883\u7684\u5305\u653e\u5230\u6b64\u5904\uff0c\u6bd4\u5982eslint\uff0cbabel\uff0ctypescript\uff0csass\u7b49\u3002 \n    &quot;echarts&quot;: &quot;5.3.0&quot;,   \/\/\u7248\u672c\u4e25\u683c\u5339\u914d\uff0c\u5b89\u88c5\u65f6\uff0c\u4f1a\u51c6\u786e\u7684\u5b89\u88c5 5.3.0 \u7248\u672c\u3002\u53c2\u89c1 https:\/\/github.com\/npm\/node-semver#versions\n    &quot;moment&quot;: &quot;&gt;2.29.1&quot;,  \/\/\u5b89\u88c5\u5927\u4e8e2.29.1\u7684\u5305\uff0c\u6bd4\u5982 2.29.2\uff0c2.30.0\uff0c3.0.0\u3002\u53c2\u89c1https:\/\/github.com\/npm\/node-semver#versions\n    &quot;normalize.css&quot;: &quot;~8.0.1&quot;, \/\/\u5927\u81f4\u5927\u4e8e8.0.1, 8.0\u53ef\u4ee5\uff0c\u4f46\u662f8.1.x\u4e0d\u53ef\u4ee5;\n    &quot;element-plus&quot;: &quot;^2.2.13&quot;, \/\/\u5c0f\u4e8e\u7b2c\u4e00\u4e2a\u975e0\u7684\u6570\u5b57\u5373\u53ef\u3002\u6bd4\u5982^1.2.3\uff0c\u5219&lt;2.0.0\u5373\u53ef\uff0c \u6bd4\u5982^0.2.3\uff0c\u5219&lt;0.3.0\u5373\u53ef\uff0c\u53c8\u6bd4\u59820.0.3\uff0c\u5219&lt;0.0.4\u5373\u53ef\n  },\n  &quot;devDependencies&quot;: {   \/\/\u4ec5\u4ec5\u5728\u5f00\u53d1\u4e2d\u4f9d\u8d56\u7684\u5305\uff0c\u5728\u6253\u5305\u65f6\uff0c\u4e0d\u4f1a\u88ab\u6253\u8fdb\u53bb\u7684\u6a21\u5757\u3002 \n    &quot;@babel\/core&quot;: &quot;^7.12.16&quot;,\n    &quot;@babel\/eslint-parser&quot;: &quot;^7.12.16&quot;,\n    &quot;@vue\/cli-service&quot;: &quot;~5.0.0&quot;,\n    &quot;eslint-config-prettier&quot;: &quot;^8.3.0&quot;,\n    &quot;sass&quot;: &quot;^1.32.7&quot;,\n    &quot;sass-loader&quot;: &quot;^12.0.0&quot;,\n  },\n  &quot;peerDependencies&quot;: {   \/\/\u5982\u679c\u5f53\u524d\u5305\u4f9d\u8d56\u67d0\u4e2a\u5305\uff0c\u90a3\u4e48\u5f53\u5f53\u524d\u5305\u88ab\u5b89\u88c5\u65f6\uff0c\u4f9d\u8d56\u7684\u90a3\u4e2a\u5305\u4e5f\u4e00\u5e76\u5b89\u88c5\u3002\n    &quot;vue&quot;: &quot;3.2.31&quot;\n  },\n  &quot;peerDependenciesMeta&quot;: &quot;&quot;,\n  &quot;bundleDependencies&quot;: &quot;&quot;,\n  &quot;optionalDependencies&quot;: &quot;&quot;,\n  &quot;overrides&quot;: &quot;&quot;,\n  &quot;engines&quot;: {      \/\/\u63a8\u8350\u7684node\u548cnpm\u7248\u672c\uff0c\u5982\u679c\u4e0d\u5339\u914d\u4e5f\u4e0d\u4f1a\u62a5\u9519\uff0c\u53ea\u662f\u5efa\u8bae\u6ee1\u8db3\u7248\u672c\u3002\n    &quot;node&quot;: &quot;&gt;=0.10.3 &lt;15&quot;,\n    &quot;npm&quot;: &quot;~1.0.20&quot;\n  },\n  &quot;os&quot;: [&quot;darwin&quot;, &quot;linux&quot;],    \/\/\u6307\u5b9a\u6a21\u5757\u8fd0\u884c\u5728\u6307\u5b9a\u64cd\u4f5c\u7cfb\u7edf\u4e0a\n  &quot;cpu&quot;: [&quot;x64&quot;, &quot;ia32&quot;],   \/\/\u5982\u679c\u4ee3\u7801\u4ec5\u5728\u67d0\u4e9bcpu\u67b6\u6784\u4e0a\u8fd0\u884c\uff0c\u5219\u53ef\u4ee5\u6307\u5b9a\u54ea\u4e9b\u67b6\u6784\u3002\n  &quot;publishConfig&quot;: {\n    &quot;access&quot;: &quot;public&quot;,\n  },\n  &quot;workspaces&quot;: &quot;&quot;,\n\n\n  \/\/\u4e0b\u9762\u7684\u5b57\u6bb5\u4e0d\u662f\u89c4\u8303\uff0c\u5374\u5f88\u91cd\u8981\n  &quot;module&quot;: &quot;dist\/vuex.esm-bundler.js&quot;, \/\/esm \u5f15\u7528\u65f6\u7684\u5165\u53e3\uff0c\u6267\u884cimport vuex from &quot;vuex&quot;\u65f6\u8c03\u7528\u3002\u6ce8\u610f\u6b64\u5b57\u6bb5\u4e0d\u662f\u89c4\u8303\uff0c\u4f46\u662f\u5374\u88abrollup\u548cwebpack\u5927\u91cf\u4f7f\u7528\uff0c\u672a\u6765\u6781\u6709\u53ef\u80fd\u6210\u4e3a\u89c4\u8303\u3002\n  &quot;exports&quot;: {  \/\/ \u5bfc\u51fa\u58f0\u660e\uff0c\u5728\u5bfc\u5165\u6a21\u5757\u548c\u5b50\u6a21\u5757\u65f6\uff0c\u4f1a\u4f7f\u7528\u4e0d\u540c\u7684\u8def\u5f84\u3002\n    &quot;.&quot;: {\n      &quot;require&quot;: &quot;.\/dist\/vuex.cjs.js&quot;,  \/\/\u4f7f\u7528require\u65f6\u5bfc\u5165\n      &quot;import&quot;: &quot;.\/dist\/vuex.mjs&quot;,      \/\/\u4f7f\u7528 import\u65f6\u5bfc\u5165\n      &quot;browser&quot;: &quot;.\/dist\/vuex.umd.js&quot;,  \/\/\u6d4f\u89c8\u5668\u7aef\u4f7f\u7528\u5bfc\u5165\n      &quot;types&quot;: &quot;.\/dist\/types\/vuex.d.ts&quot;,  \/\/ts\u73af\u5883\u4f7f\u7528\n    },\n    &quot;.&quot;: &quot;.\/dist\/vuex.umd.js&quot;,     \/\/ import &quot;vuex&quot;\u65f6\uff0c\u4f1a\u52a0\u8f7d vuex\/dist\/vuex.umd.js \u8def\u5f84\u6587\u4ef6\n    &quot;.\/sub\/path&quot;: &quot;.\/secondary.js&quot;, \/\/ import &quot;vuex\/sub\/path&quot;\u65f6\uff0c\u4f1a\u52a0\u8f7d vuex\/secondary.js \u8def\u5f84\u6587\u4ef6\n  },\n  &quot;unpkg&quot;: &quot;dist\/vuex.global.js&quot;,  \/\/CDN\u670d\u52a1\u5730\u5740\n  &quot;jsdelivr&quot;: &quot;dist\/vuex.global.js&quot;, \/\/CDN\u670d\u52a1\u5730\u5740\n  &quot;typings&quot;: &quot;types\/index.d.ts&quot;,   \/\/\u5b9a\u4e49 typescript\u58f0\u660e\u6587\u4ef6\u7684\u5730\u5740\n}<\/code><\/pre>\n<p>\u5f53\u7136\u9664\u4e86\u4e0a\u9762\u7684\u5b57\u6bb5\uff0c\u8fd8\u6709\u4e00\u4e9b\u5176\u4ed6\u5730\u65b9\uff0c\u867d\u7136npm\u5b98\u65b9\u6ca1\u6709\u6307\u5b9a\uff0c\u4f46\u662f\u6211\u4eec\u4f9d\u7136\u5728\u4f7f\u7528\u3002\u6bd4\u5982<\/p>\n<pre><code class=\"json\">&quot;browserslist&quot;: [\n    &quot;&gt; 1%&quot;,\n    &quot;last 2 versions&quot;\n],\n&quot;babel&quot;:{\n  presets: [&quot;@vue\/cli-plugin-babel\/preset&quot;],\n},\n&quot;prettier&quot;:{\n  &quot;trailingComma&quot;: &quot;es5&quot;,\n  &quot;tabWidth&quot;: 4,\n  &quot;semi&quot;: false,\n  &quot;singleQuote&quot;: true\n}<\/code><\/pre>\n<p>\u6709\u4e2a\u6ce8\u610f\u70b9:<br \/><strong>\u5728package.json\u4e2d\uff0c\u6709\u4e09\u4e2a\u5b57\u6bb5\u53ef\u4ee5\u5b9a\u4e49\u5f15\u7528\u5305\u7684\u5165\u53e3\u70b9<\/strong><\/p>\n<blockquote>\n<p>module  \/\/\u5b9a\u4e49\u4e3b\u8981\u5165\u53e3\u70b9\uff0c\u4e13\u95e8\u4e3aesm \u63d0\u4f9b\uff0c\u76ee\u7684\u65f6 tree-shaking\uff0c\u6ca1\u6709\u65f6\uff0c\u627emain<\/p>\n<p>main   \/\/\u5b9a\u4e49\u4e3b\u8981\u5165\u53e3\u70b9\uff0c  esm\u548ccjs\u63d0\u4f9b\u3002<\/p>\n<p>exports \/\/\u5b9a\u4e49\u591a\u4e2a\u5165\u53e3\u70b9\uff08\u63a8\u8350\u4f7f\u7528\uff09\uff0c\u4f18\u5148\u7ea7\u6bd4\u4e0a\u9762\u4e24\u4e2a\u9ad8\u3002\u4e3aesm\u548ccjs\u63d0\u4f9b\uff0c\u5728\u5f15\u5165exports\u4e4b\u5916\u7684\u8def\u5f84\u65f6\uff0c\u4f1a\u62a5\u9519\u3002 \u8be6\u60c5\u53c2\u8003 <a href=\"https:\/\/link.segmentfault.com\/?enc=Ck5pUiAoWNLUo0dTr8ZPCw%3D%3D.7UKfk6e%2FoTj3vQ5BmaATEHfWN6H2Unpqw6tyFHIXeypxszYMaCsd5bkE1oe%2FsmYTU2WJdNYLtxi%2BwYqReSztgg%3D%3D\" rel=\"nofollow\">https:\/\/nodejs.org\/dist\/lates&#8230;<\/a><\/p>\n<\/blockquote>\n<p>package.json\u4e2d\u7684\u5b57\u6bb5\uff0c\u5728\u4e0b\u56fe\u7684\u4f53\u73b0<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc2dzW\" alt=\"image.png\" title=\"image.png\" loading=\"lazy\"><br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc2dzY\" alt=\"image.png\" title=\"image.png\" loading=\"lazy\"><\/p>\n<p>\u4e0b\u9762\u662f\u4f9d\u8d56\u5173\u7cfb\uff0c\u7c7b\u4f3c\u4e8e\u8fd9\u6837\u7684\u5173\u7cfb   Dependency &#8212;&gt; vuex&#8212;-&gt;Dependents\uff0c vuex\u4f9d\u8d56Dependency\u4e2d\u7684\u5305\uff0cDependents\u53c8\u4f9d\u8d56\u4e8evuex\u5305\u3002<br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc2dz4\" alt=\"image.png\" title=\"image.png\" loading=\"lazy\"><br \/><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc2dz5\" alt=\"image.png\" title=\"image.png\" loading=\"lazy\"><\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000042435553\">https:\/\/segmentfault.com\/a\/1190000042435553<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6253\u5f00 npm \u7684\u5b98\u65b9\u6587\u6863 npm Docs { \/\/\u53d1\u73b0\u4ee5\u4e0b\u768431\u4e2a\u5b57\u6bb5\u90fd\u662f\u5b98\u65b9\u7684\u6807\u51c6 &quot;name&#038; [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-10006405","post","type-post","status-publish","format-standard","hentry"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006405","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10006405"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006405\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10006405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10006405"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10006405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}