{"id":663,"date":"2025-12-09T16:24:31","date_gmt":"2025-12-09T08:24:31","guid":{"rendered":"https:\/\/www.52runoob.com\/?p=663"},"modified":"2025-12-09T16:24:31","modified_gmt":"2025-12-09T08:24:31","slug":"unpkg%e4%b8%ad%e6%9f%a5%e6%89%becdn%e6%8c%87%e5%ae%9a%e7%89%88%e6%9c%ac%e9%93%be%e6%8e%a5","status":"publish","type":"post","link":"https:\/\/www.52runoob.com\/index.php\/2025\/12\/09\/unpkg%e4%b8%ad%e6%9f%a5%e6%89%becdn%e6%8c%87%e5%ae%9a%e7%89%88%e6%9c%ac%e9%93%be%e6%8e%a5\/","title":{"rendered":"unpkg\u4e2d\u67e5\u627eCDN\u6307\u5b9a\u7248\u672c\u94fe\u63a5"},"content":{"rendered":"\n<p>\u4e0b\u9762\u7ed9\u4f60\u4e00\u4efd <strong>\u6700\u6e05\u6670\u3001\u6700\u5b9e\u7528\u3001\u53ef\u76f4\u63a5\u64cd\u4f5c\u7684\u300a\u5982\u4f55\u5728 unpkg \u4e2d\u67e5\u627e CDN \u6307\u5b9a\u7248\u672c\u94fe\u63a5\u300b\u6307\u5357<\/strong>\uff0c\u5305\u62ec\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u67e5\u627e\u7279\u5b9a\u7248\u672c\u7684\u6b63\u786e\u65b9\u5f0f<\/li>\n\n\n\n<li>\u5e38\u7528 URL \u6a21\u677f<\/li>\n\n\n\n<li>\u5982\u4f55\u67e5\u770b\u6587\u4ef6\u7ed3\u6784<\/li>\n\n\n\n<li>\u5982\u4f55\u67e5\u627e\u6700\u65b0 \/ \u6307\u5b9a\u7248\u672c<\/li>\n\n\n\n<li>\u5b9e\u4f8b\u6f14\u793a\uff08Vue \/ React \/ Lodash \u7b49\uff09<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83c\udfaf \u4e00\u3001unpkg \u662f\u4ec0\u4e48\uff1f<\/h1>\n\n\n\n<p>unpkg \u662f\u57fa\u4e8e npm \u7684\u5168\u7403 CDN\uff1a<br><strong>\u53ea\u8981\u5305\u5728 npm \u4e0a\uff0c\u5c31\u80fd\u901a\u8fc7 URL \u76f4\u63a5\u8bbf\u95ee\u4efb\u4f55\u7248\u672c\u6587\u4ef6\u3002<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83e\udde9 \u4e8c\u3001unpkg \u7684 URL \u89c4\u5219\uff08\u6838\u5fc3\uff09<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">1\uff09\u8bbf\u95ee\u67d0\u4e2a\u5305\u7684\u6700\u65b0\u7248\u672c<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/&amp;lt;\u5305\u540d&gt;\n\n<\/pre><\/div>\n\n\n<p>\u4f8b\u5982\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/vue\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2\uff09\u8bbf\u95ee\u67d0\u4e2a\u201c\u6307\u5b9a\u7248\u672c\u201d<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/&amp;lt;\u5305\u540d&gt;@&amp;lt;\u7248\u672c\u53f7&gt;\n\n<\/pre><\/div>\n\n\n<p>\u4f8b\u5982\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/vue@3.4.21\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3\uff09\u8bbf\u95ee\u6307\u5b9a\u7248\u672c\u5185\u7684\u67d0\u4e2a\u6587\u4ef6<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/&amp;lt;\u5305\u540d&gt;@&amp;lt;\u7248\u672c\u53f7&gt;\/&amp;lt;\u6587\u4ef6\u8def\u5f84&gt;\n\n<\/pre><\/div>\n\n\n<p>\u4f8b\u5982 Vue 3 \u7684\u5168\u91cf\u6784\u5efa\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/vue@3.4.21\/dist\/vue.global.js\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83e\udded \u4e09\u3001\u5982\u4f55\u67e5\u770b\u67d0\u4e2a\u5305\u7684\u6240\u6709\u7248\u672c\uff1f<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u65b9\u6cd5 1\uff1a\u67e5\u770b npm \u9875\u9762\uff08\u6700\u63a8\u8350\uff09<\/h2>\n\n\n\n<p>\u6253\u5f00 npm\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/www.npmjs.com\/package\/&amp;lt;\u5305\u540d&gt;\n\n<\/pre><\/div>\n\n\n<p>\u4f8b\u5982\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/www.npmjs.com\/package\/vue\n\n<\/pre><\/div>\n\n\n<p>\u5728 \u201cVersions\u201d \u5373\u53ef\u67e5\u770b\u6240\u6709\u7248\u672c\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u65b9\u6cd5 2\uff1a\u4f7f\u7528 unpkg \u5f3a\u5236\u663e\u793a\u76ee\u5f55\u7ed3\u6784<\/h2>\n\n\n\n<p>\u53ea\u9700\u5728 URL \u52a0\u4e00\u4e2a <code>?meta<\/code><br>\u5373\u53ef\u663e\u793a\u8be5\u5305\u7248\u672c\u7684\u76ee\u5f55\u6811\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/&amp;lt;\u5305\u540d&gt;@&amp;lt;\u7248\u672c\u53f7&gt;\/?meta\n\n<\/pre><\/div>\n\n\n<p>\u4f8b\u5b50\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/vue@3.4.21\/?meta\n\n<\/pre><\/div>\n\n\n<p>\u4f60\u53ef\u4ee5\u770b\u5230\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>dist\/<\/li>\n\n\n\n<li>package.json<\/li>\n\n\n\n<li>compiler\/<\/li>\n\n\n\n<li>server-renderer\/<\/li>\n\n\n\n<li>\u2026<\/li>\n<\/ul>\n\n\n\n<p>\u91cc\u9762\u6bcf\u4e2a\u6587\u4ef6\u70b9\u8fdb\u53bb\u90fd\u80fd\u53d6\u5230 CDN URL\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udd0d \u56db\u3001\u4e00\u6b65\u67e5\u627e CDN \u6307\u5b9a\u7248\u672c\u65b9\u6cd5\uff08\u6700\u7b80\u5355\uff09<\/h1>\n\n\n\n<p>\u5047\u8bbe\u4f60\u60f3\u67e5\uff1a<br><strong>lodash \u7684 4.17.21 \u7684 CDN \u94fe\u63a5<\/strong><\/p>\n\n\n\n<p>\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<p>\u2460 \u6253\u5f00\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/lodash@4.17.21\/?meta\n\n<\/pre><\/div>\n\n\n<p>\u2461 \u627e\u5230\u4f60\u8981\u7684\u6587\u4ef6\uff0c\u4f8b\u5982\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>lodash.js<\/code><\/li>\n\n\n\n<li><code>lodash.min.js<\/code><\/li>\n<\/ul>\n\n\n\n<p>\u2462 \u70b9\u51fb\u5373\u5f97\u5230\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/lodash@4.17.21\/lodash.min.js\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udce6 \u4e94\u3001\u5e38\u7528 JS \u6846\u67b6\u793a\u4f8b\uff08\u53ef\u76f4\u63a5\u590d\u5236\uff09<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">Vue 3 \u6307\u5b9a\u7248\u672c<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/vue@3.4.21\/dist\/vue.global.js\n\n<\/pre><\/div>\n\n\n<p>Vue 3 \u751f\u4ea7\u7248\u672c\uff08\u538b\u7f29\uff09\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/vue@3.4.21\/dist\/vue.global.prod.js\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">React \u6307\u5b9a\u7248\u672c<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/react@18.3.1\/umd\/react.production.min.js\nhttps:\/\/unpkg.com\/react-dom@18.3.1\/umd\/react-dom.production.min.js\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Axios \u6307\u5b9a\u7248\u672c<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/axios@1.6.5\/dist\/axios.min.js\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Bootstrap \u6307\u5b9a\u7248\u672c\uff08css + js\uff09<\/h3>\n\n\n\n<p>CSS\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/bootstrap@5.3.2\/dist\/css\/bootstrap.min.css\n\n<\/pre><\/div>\n\n\n<p>JS\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/bootstrap@5.3.2\/dist\/js\/bootstrap.bundle.min.js\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udee0 \u516d\u3001\u5982\u679c\u4f60\u4e0d\u77e5\u9053\u7248\u672c\u600e\u4e48\u529e\uff1f<\/h1>\n\n\n\n<p>\u53ef\u4ee5\u76f4\u63a5\u8bbf\u95ee\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/&amp;lt;\u5305\u540d&gt;\/package.json\n\n<\/pre><\/div>\n\n\n<p>\u4f8b\u5982\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/vue\/package.json\n\n<\/pre><\/div>\n\n\n<p>\u91cc\u9762\u6709\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&quot;version&quot;: &quot;3.4.21&quot;\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udcd8 \u4e03\u3001\u603b\u7ed3\uff08\u4e00\u53e5\u8bdd\u8bb0\u4f4f\uff09<\/h1>\n\n\n\n<p>\u4f7f\u7528 unpkg \u67e5\u627e CDN \u7684 <strong>\u4e07\u80fd\u516c\u5f0f<\/strong>\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/&amp;lt;\u5305\u540d&gt;@&amp;lt;\u7248\u672c\u53f7&gt;\/&amp;lt;\u8def\u5f84&gt;\n\n<\/pre><\/div>\n\n\n<p>\u67e5\u770b\u76ee\u5f55\u7ed3\u6784\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/&amp;lt;\u5305\u540d&gt;@&amp;lt;\u7248\u672c\u53f7&gt;\/?meta\n\n<\/pre><\/div>\n\n\n<p>\u67e5\u770b\u9ed8\u8ba4\u6587\u4ef6\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/unpkg.com\/&amp;lt;\u5305\u540d&gt;@&amp;lt;\u7248\u672c\u53f7&gt;\n\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>\u4e0b\u9762\u7ed9\u4f60\u4e00\u4efd \u6700\u6e05\u6670\u3001\u6700\u5b9e\u7528\u3001\u53ef\u76f4\u63a5\u64cd\u4f5c\u7684\u300a\u5982\u4f55\u5728 unpkg \u4e2d\u67e5\u627e CDN &#8230; <a class=\"more-link\" href=\"https:\/\/www.52runoob.com\/index.php\/2025\/12\/09\/unpkg%e4%b8%ad%e6%9f%a5%e6%89%becdn%e6%8c%87%e5%ae%9a%e7%89%88%e6%9c%ac%e9%93%be%e6%8e%a5\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-663","post","type-post","status-publish","format-standard","hentry","category-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/comments?post=663"}],"version-history":[{"count":1,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/663\/revisions"}],"predecessor-version":[{"id":664,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/663\/revisions\/664"}],"wp:attachment":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/media?parent=663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/categories?post=663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/tags?post=663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}