{"id":295773,"date":"2024-05-20T15:43:50","date_gmt":"2024-05-20T07:43:50","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/295773.html"},"modified":"2024-05-20T15:44:15","modified_gmt":"2024-05-20T07:44:15","slug":"webpack-%e5%a6%82%e4%bd%95%e6%9e%84%e5%bb%ba-react-%e5%a4%9a","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/295773.html","title":{"rendered":"webpack \u5982\u4f55\u6784\u5efa react \u591a"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/27143129\/9e6e0ee1-88fd-4002-bbe5-320909a1885d.webp\" alt=\"webpack \u5982\u4f55\u6784\u5efa react \u591a\" \/><\/p>\n<p><p>Webpack\u901a\u8fc7\u4e00\u7cfb\u5217\u914d\u7f6e\u548c\u63d2\u4ef6\uff0c\u4f18\u5316\u5e76\u9ad8\u6548\u5730\u6784\u5efa\u7528\u4e8e\u751f\u4ea7\u7684React\u591a\u9875\u9762\u5e94\u7528\u3002\u8fd9\u4e9b\u5173\u952e\u914d\u7f6e\u5305\u62ec<strong>\u5165\u53e3\u8bbe\u7f6e\u3001HTML\u6a21\u677f\u521b\u5efa\u3001\u4ee3\u7801\u5206\u5272\u3001\u6837\u5f0f\u5904\u7406<\/strong>\u7b49\u3002\u5728\u8fd9\u4e9b\u4e2d\uff0c<strong>\u4ee3\u7801\u5206\u5272<\/strong>\u5c24\u5176\u91cd\u8981\uff0c\u56e0\u4e3a\u5b83\u5141\u8bb8\u6211\u4eec\u5c06\u4ee3\u7801\u62c6\u5206\u6210\u591a\u4e2a\u5305\uff0c\u6bcf\u4e2a\u9875\u9762\u53ea\u52a0\u8f7d\u5bf9\u5e94\u7684\u5fc5\u8981\u8d44\u6e90\uff0c\u663e\u8457\u63d0\u9ad8\u5e94\u7528\u7684\u52a0\u8f7d\u901f\u5ea6\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5165\u53e3\u8bbe\u7f6e<\/h3>\n<\/p>\n<p><p>\u5728Webpack\u4e2d\uff0c\u6bcf\u4e2a\u9875\u9762\u90fd\u53ef\u4ee5\u901a\u8fc7<strong>\u5165\u53e3\uff08entry\uff09\u8bbe\u7f6e<\/strong>\u6765\u5b9a\u4e49\u3002\u8fd9\u662f\u6784\u5efa\u591a\u9875\u9762\u5e94\u7528\u7684\u57fa\u7840\u3002\u4f60\u9700\u8981\u5728Webpack\u914d\u7f6e\u6587\u4ef6\u4e2d\u6307\u5b9a\u6bcf\u4e2a\u9875\u9762\u7684\u5165\u53e3\u6587\u4ef6\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8e\u4e00\u4e2a\u5305\u542b\u9996\u9875\u548c\u5173\u4e8e\u9875\u7684\u5e94\u7528\uff0c\u4f60\u7684\u5165\u53e3\u914d\u7f6e\u53ef\u80fd\u770b\u8d77\u6765\u50cf\u8fd9\u6837\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">module.exports = {<\/p>\n<p>  entry: {<\/p>\n<p>    index: &#039;.\/src\/index.js&#039;,<\/p>\n<p>    about: &#039;.\/src\/about.js&#039;,<\/p>\n<p>  },<\/p>\n<p>  \/\/ \u5176\u4ed6\u914d\u7f6e...<\/p>\n<p>};<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u91cc\uff0c<code>index<\/code>\u548c<code>about<\/code>\u5206\u522b\u662f\u4e24\u4e2a\u9875\u9762\u7684\u5165\u53e3\u3002Webpack\u4f1a\u5206\u522b\u4e3a\u5b83\u4eec\u6253\u5305\u3002<\/p>\n<\/p>\n<p><p>\u5165\u53e3\u6587\u4ef6\u662f\u6bcf\u4e2a\u9875\u9762\u7684\u4e3b\u8981JavaScript\u6587\u4ef6\uff0c\u5728\u8fd9\u91cc\u4f60\u53ef\u4ee5\u5f15\u5165React\u7ec4\u4ef6\u3001\u6837\u5f0f\u6587\u4ef6\u4ee5\u53ca\u5176\u4ed6\u5fc5\u8981\u7684\u9759\u6001\u8d44\u6e90\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001HTML\u6a21\u677f\u521b\u5efa<\/h3>\n<\/p>\n<p><p>\u4f7f\u7528<strong>HtmlWebpackPlugin<\/strong>\uff0c\u53ef\u4ee5\u4e3a\u6bcf\u4e2a\u5165\u53e3\u521b\u5efa\u5bf9\u5e94\u7684HTML\u6587\u4ef6\u3002\u8fd9\u4e2a\u63d2\u4ef6\u4f1a\u81ea\u52a8\u5c06\u751f\u6210\u7684js\u6587\u4ef6\u6ce8\u5165\u5230HTML\u6a21\u677f\u4e2d\u3002\u5bf9\u4e8e\u591a\u9875\u9762\u5e94\u7528\uff0c\u4f60\u9700\u8981\u4e3a\u6bcf\u4e2a\u9875\u9762\u6307\u5b9a\u4e00\u4e2aHtmlWebpackPlugin\u5b9e\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">const HtmlWebpackPlugin = require(&#039;html-webpack-plugin&#039;);<\/p>\n<p>module.exports = {<\/p>\n<p>  \/\/ \u5165\u53e3\u8bbe\u7f6e...<\/p>\n<p>  plugins: [<\/p>\n<p>    new HtmlWebpackPlugin({<\/p>\n<p>      template: &#039;.\/src\/index.html&#039;,<\/p>\n<p>      filename: &#039;index.html&#039;,<\/p>\n<p>      chunks: [&#039;index&#039;],<\/p>\n<p>    }),<\/p>\n<p>    new HtmlWebpackPlugin({<\/p>\n<p>      template: &#039;.\/src\/about.html&#039;,<\/p>\n<p>      filename: &#039;about.html&#039;,<\/p>\n<p>      chunks: [&#039;about&#039;],<\/p>\n<p>    }),<\/p>\n<p>    \/\/ \u53ef\u4ee5\u6dfb\u52a0\u66f4\u591a\u9875\u9762...<\/p>\n<p>  ],<\/p>\n<p>  \/\/ \u5176\u4ed6\u914d\u7f6e...<\/p>\n<p>};<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6bcf\u4e2a\u9875\u9762\u90fd\u6709\u81ea\u5df1\u7684\u6a21\u677f\u6587\u4ef6\uff0c\u5e76\u4e14\u4f60\u53ef\u4ee5\u901a\u8fc7<code>chunks<\/code>\u6307\u5b9a\u54ea\u4e9b\u5165\u53e3\u7684js\u6587\u4ef6\u5e94\u8be5\u88ab\u5305\u542b\u5728\u751f\u6210\u7684HTML\u6587\u4ef6\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u4ee3\u7801\u5206\u5272<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u4f18\u5316\u52a0\u8f7d\u901f\u5ea6\u548c\u6027\u80fd\uff0cWebpack\u63d0\u4f9b\u4e86\u4ee3\u7801\u5206\u5272\uff08code splitting\uff09\u529f\u80fd\uff0c\u7279\u522b\u662f\u901a\u8fc7\u52a8\u6001\u5bfc\u5165\uff08\u4f8b\u5982\u4f7f\u7528import()\u8bed\u6cd5\uff09\u6765\u5b9e\u73b0\u3002\u8fd9\u8ba9\u6211\u4eec\u53ef\u4ee5\u53ea\u52a0\u8f7d\u7528\u6237\u5f53\u524d\u9700\u8981\u7684\u4ee3\u7801\uff0c\u800c\u5176\u4ed6\u4ee3\u7801\u5219\u53ef\u4ee5\u5728\u9700\u8981\u65f6\u624d\u52a0\u8f7d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">import(&#039;path\/to\/myModule.js&#039;)<\/p>\n<p>  .then((module) =&gt; {<\/p>\n<p>    \/\/ \u4f7f\u7528module<\/p>\n<p>  })<\/p>\n<p>  .catch(err =&gt; {<\/p>\n<p>    \/\/ \u5904\u7406\u52a0\u8f7d\u9519\u8bef<\/p>\n<p>  });<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u79cd\u65b9\u5f0f\u975e\u5e38\u9002\u5408\u5927\u578b\u5e94\u7528\uff0c\u53ef\u4ee5\u51cf\u5c11\u521d\u59cb\u52a0\u8f7d\u65f6\u95f4\uff0c\u63d0\u5347\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u6837\u5f0f\u5904\u7406<\/h3>\n<\/p>\n<p><p>\u5728Webpack\u4e2d\u5904\u7406\u6837\u5f0f\u901a\u5e38\u9700\u8981\u4f7f\u7528\u5230<strong>style-loader<\/strong>\u548c<strong>css-loader<\/strong>\u8fd9\u4e24\u4e2aloader\u3002\u4f46\u5bf9\u4e8eReact\u591a\u9875\u9762\u5e94\u7528\uff0c\u53ef\u80fd\u8fd8\u9700\u8981\u8fdb\u4e00\u6b65\u7684\u914d\u7f6e\uff0c\u4f8b\u5982\u4f7f\u7528<strong>MiniCssExtractPlugin<\/strong>\u6765\u63d0\u53d6\u548c\u5206\u5272CSS\u6587\u4ef6\u3002\u8fd9\u6837\u53ef\u4ee5\u5bf9CSS\u8fdb\u884c\u7f13\u5b58\u548c\u5e76\u884c\u52a0\u8f7d\uff0c\u8fdb\u4e00\u6b65\u63d0\u5347\u6027\u80fd\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-javascript\">const MiniCssExtractPlugin = require(&#039;mini-css-extract-plugin&#039;);<\/p>\n<p>module.exports = {<\/p>\n<p>  \/\/ \u5176\u4ed6\u914d\u7f6e...<\/p>\n<p>  module: {<\/p>\n<p>    rules: [<\/p>\n<p>      {<\/p>\n<p>        test: \/\\.css$\/,<\/p>\n<p>        use: [MiniCssExtractPlugin.loader, &#039;css-loader&#039;],<\/p>\n<p>      },<\/p>\n<p>      \/\/ \u5904\u7406\u5176\u4ed6\u6587\u4ef6\u7c7b\u578b...<\/p>\n<p>    ],<\/p>\n<p>  },<\/p>\n<p>  plugins: [<\/p>\n<p>    new MiniCssExtractPlugin({<\/p>\n<p>      filename: &#039;[name].css&#039;,<\/p>\n<p>    }),<\/p>\n<p>  ],<\/p>\n<p>  \/\/ \u5176\u4ed6\u914d\u7f6e...<\/p>\n<p>};<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u914d\u7f6e\uff0c\u6bcf\u4e2a\u9875\u9762\u7684CSS\u5c06\u88ab\u63d0\u53d6\u5230\u5355\u72ec\u7684\u6587\u4ef6\u4e2d\uff0c\u800c\u4e0d\u662f\u6253\u5305\u8fdbJavaScript\u4e2d\uff0c\u8fd9\u6709\u52a9\u4e8e\u52a0\u5feb\u9996\u6b21\u6e32\u67d3\u901f\u5ea6\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u4f18\u5316\u6280\u5de7<\/h3>\n<\/p>\n<p><p>\u6784\u5efaReact\u591a\u9875\u9762\u5e94\u7528\u65f6\uff0c\u9664\u4e86\u4e0a\u8ff0\u51e0\u70b9\u5e38\u89c4\u505a\u6cd5\u5916\uff0c\u8fd8\u53ef\u4ee5\u91c7\u7528\u5176\u4ed6\u4e00\u4e9b\u4f18\u5316\u6280\u5de7\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u4f7f\u7528<strong>compression-webpack-plugin<\/strong>\u63d2\u4ef6\u8fdb\u884c\u8d44\u6e90\u538b\u7f29\uff0c\u51cf\u5c11\u4f20\u8f93\u5927\u5c0f\u3002<\/li>\n<li>\u5229\u7528<strong>webpack-bundle-analyzer<\/strong>\u68c0\u67e5\u548c\u5206\u6790bundle\u6587\u4ef6\uff0c\u627e\u51fa\u4f18\u5316\u673a\u4f1a\u3002<\/li>\n<li>\u8bbe\u7f6e<strong>splitChunks<\/strong>\u6765\u907f\u514d\u91cd\u590d\u6253\u5305\u516c\u5171\u4f9d\u8d56\uff0c\u51cf\u5c11\u4ee3\u7801\u5197\u4f59\u3002<\/li>\n<\/ul>\n<p><p>\u901a\u8fc7\u5408\u7406\u914d\u7f6eWebpack\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u6784\u5efa\u548c\u4f18\u5316React\u591a\u9875\u9762\u5e94\u7528\uff0c\u63d0\u5347\u5f00\u53d1\u6548\u7387\u548c\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u5982\u4f55\u5728Webpack\u4e2d\u6784\u5efa\u591a\u9875\u9762React\u5e94\u7528\uff1f<\/strong><\/p>\n<p>Webpack\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u6a21\u5757\u6253\u5305\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u6765\u6784\u5efa\u591a\u9875\u9762\u7684React\u5e94\u7528\u3002\u8981\u5728Webpack\u4e2d\u6784\u5efa\u591a\u9875\u9762React\u5e94\u7528\uff0c\u9700\u8981\u8fdb\u884c\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ul>\n<li>\u9996\u5148\uff0c\u5728Webpack\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u5b9a\u4e49\u591a\u4e2a\u5165\u53e3\u70b9\uff08entry points\uff09\uff0c\u6bcf\u4e2a\u5165\u53e3\u70b9\u5bf9\u5e94\u4e00\u4e2a\u9875\u9762\u3002<\/li>\n<li>\u5176\u6b21\uff0c\u914d\u7f6eWebpack\u7684\u8f93\u51fa\uff08output\uff09\u9009\u9879\uff0c\u6307\u5b9a\u6bcf\u4e2a\u9875\u9762\u7684\u6253\u5305\u540e\u7684\u6587\u4ef6\u540d\u548c\u8def\u5f84\u3002<\/li>\n<li>\u7136\u540e\uff0c\u5728\u6bcf\u4e2aReact\u7ec4\u4ef6\u4e2d\uff0c\u4f7f\u7528\u4e0d\u540c\u7684\u8def\u7531\u6216URL\u6765\u533a\u5206\u4e0d\u540c\u7684\u9875\u9762\uff0c\u786e\u4fdd\u6bcf\u4e2a\u7ec4\u4ef6\u53ea\u5728\u5bf9\u5e94\u7684\u9875\u9762\u4e2d\u88ab\u6e32\u67d3\u3002<\/li>\n<li>\u6700\u540e\uff0c\u8fd0\u884cWebpack\u7684\u6784\u5efa\u547d\u4ee4\uff0c\u751f\u6210\u6253\u5305\u540e\u7684\u6587\u4ef6\uff0c\u5e76\u5c06\u5176\u90e8\u7f72\u5230\u670d\u52a1\u5668\u4e0a\u3002<\/li>\n<\/ul>\n<p><strong>2. \u5982\u4f55\u5728Webpack\u4e2d\u4f7f\u7528Babel\u6765\u7f16\u8bd1React\u4ee3\u7801\uff1f<\/strong><\/p>\n<p>\u8981\u5728Webpack\u4e2d\u4f7f\u7528Babel\u6765\u7f16\u8bd1React\u4ee3\u7801\uff0c\u9700\u8981\u8fdb\u884c\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ul>\n<li>\u9996\u5148\uff0c\u5728Webpack\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u914d\u7f6eBabel\u7684\u52a0\u8f7d\u5668\uff08loader\uff09\uff0c\u4ee5\u4fbf\u8ba9Webpack\u80fd\u591f\u4f7f\u7528Babel\u6765\u5904\u7406JSX\u8bed\u6cd5\u3002<\/li>\n<li>\u5176\u6b21\uff0c\u5b89\u88c5\u6240\u9700\u7684Babel\u63d2\u4ef6\u548c\u9884\u8bbe\uff08preset\uff09\uff0c\u6bd4\u5982&quot;@babel\/preset-react&quot;\uff0c\u7528\u4e8e\u7f16\u8bd1React\u4ee3\u7801\u3002<\/li>\n<li>\u7136\u540e\uff0c\u5728Babel\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u914d\u7f6e\u6240\u9700\u7684\u63d2\u4ef6\u548c\u9884\u8bbe\uff0c\u4ee5\u53ca\u5176\u4ed6\u9009\u9879\uff0c\u6bd4\u5982babel-loader\u7684\u914d\u7f6e\u9009\u9879\u3002<\/li>\n<li>\u6700\u540e\uff0c\u8fd0\u884cWebpack\u7684\u6784\u5efa\u547d\u4ee4\uff0cWebpack\u4f1a\u81ea\u52a8\u4f7f\u7528Babel\u6765\u7f16\u8bd1React\u4ee3\u7801\uff0c\u5e76\u5c06\u5176\u6253\u5305\u5230\u8f93\u51fa\u7684\u6587\u4ef6\u4e2d\u3002<\/li>\n<\/ul>\n<p><strong>3. \u5982\u4f55\u5728Webpack\u4e2d\u4f18\u5316React\u5e94\u7528\u7684\u6027\u80fd\uff1f<\/strong><\/p>\n<p>\u4f18\u5316React\u5e94\u7528\u7684\u6027\u80fd\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u4efb\u52a1\uff0cWebpack\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807\u3002\u4ee5\u4e0b\u662f\u51e0\u4e2a\u4f18\u5316React\u5e94\u7528\u6027\u80fd\u7684\u65b9\u6cd5\uff1a<\/p>\n<ul>\n<li>\u4f7f\u7528Webpack\u7684\u4ee3\u7801\u5206\u5272\u529f\u80fd\uff0c\u5c06\u5e94\u7528\u7684\u4ee3\u7801\u62c6\u5206\u6210\u591a\u4e2a\u5757\uff08chunks\uff09\uff0c\u6309\u9700\u52a0\u8f7d\u3002\u8fd9\u6837\u53ef\u4ee5\u51cf\u5c11\u521d\u59cb\u52a0\u8f7d\u65f6\u95f4\uff0c\u5e76\u63d0\u9ad8\u9875\u9762\u7684\u54cd\u5e94\u901f\u5ea6\u3002<\/li>\n<li>\u4f7f\u7528React\u7684\u751f\u4ea7\u73af\u5883\u6784\u5efa\uff0c\u8fd9\u5c06\u7981\u7528\u4e00\u4e9b\u5f00\u53d1\u65f6\u7684\u68c0\u67e5\uff0c\u5e76\u4e14\u4f1a\u751f\u6210\u538b\u7f29\u540e\u7684\u4ee3\u7801\uff0c\u51cf\u5c0f\u6587\u4ef6\u7684\u5927\u5c0f\u3002<\/li>\n<li>\u914d\u7f6eWebpack\u7684\u4f18\u5316\u9009\u9879\uff0c\u6bd4\u5982\u4f7f\u7528UglifyJsPlugin\u6765\u538b\u7f29\u4ee3\u7801\uff0c\u4f7f\u7528SplitChunksPlugin\u6765\u63d0\u53d6\u5171\u4eab\u7684\u4ee3\u7801\u5757\u3002<\/li>\n<li>\u4f7f\u7528Webpack\u7684\u7f13\u5b58\u529f\u80fd\uff0c\u5c06\u7f16\u8bd1\u7ed3\u679c\u7f13\u5b58\u8d77\u6765\uff0c\u5728\u4e0b\u6b21\u6784\u5efa\u65f6\u53ef\u4ee5\u590d\u7528\u7f13\u5b58\u7684\u7ed3\u679c\uff0c\u51cf\u5c11\u91cd\u65b0\u7f16\u8bd1\u7684\u65f6\u95f4\u3002<\/li>\n<li>\u914d\u7f6eWebpack\u7684\u6027\u80fd\u8b66\u544a\uff0c\u6bd4\u5982\u8bbe\u7f6emaxEntrypointSize\u548cmaxAssetSize\u6765\u9650\u5236\u6253\u5305\u540e\u7684\u6587\u4ef6\u5927\u5c0f\u3002<\/li>\n<li>\u4f7f\u7528Webpack\u7684\u63d2\u4ef6\u6216\u8005\u52a0\u8f7d\u5668\uff08loader\uff09\u6765\u4f18\u5316\u56fe\u7247\u3001\u5b57\u4f53\u7b49\u8d44\u6e90\u7684\u52a0\u8f7d\uff0c\u6bd4\u5982\u4f7f\u7528image-webpack-loader\u6765\u538b\u7f29\u56fe\u7247\uff0curl-loader\u6765\u5c06\u5c0f\u56fe\u7247\u8f6c\u6362\u6210base64\u7f16\u7801\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u65b9\u6cd5\u90fd\u53ef\u4ee5\u6709\u6548\u5730\u63d0\u9ad8React\u5e94\u7528\u7684\u6027\u80fd\uff0c\u5e76\u8ba9\u7528\u6237\u83b7\u5f97\u66f4\u597d\u7684\u4f7f\u7528\u4f53\u9a8c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Webpack\u901a\u8fc7\u4e00\u7cfb\u5217\u914d\u7f6e\u548c\u63d2\u4ef6\uff0c\u4f18\u5316\u5e76\u9ad8\u6548\u5730\u6784\u5efa\u7528\u4e8e\u751f\u4ea7\u7684React\u591a\u9875\u9762\u5e94\u7528\u3002\u8fd9\u4e9b\u5173\u952e\u914d\u7f6e\u5305\u62ec\u5165\u53e3\u8bbe\u7f6e\u3001 [&hellip;]","protected":false},"author":3,"featured_media":295801,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/295773"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=295773"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/295773\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/295801"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=295773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=295773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=295773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}