fes.js/assets/swc.html.01bd96f2.js

17 lines
3.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as t,r as o,o as p,c,b as s,d as n,a as r,f as a}from"./app.136d0839.js";const i={},l=a(`<h1 id="fesjs-plugin-swc" tabindex="-1"><a class="header-anchor" href="#fesjs-plugin-swc" aria-hidden="true">#</a> @fesjs/plugin-swc</h1><h2 id="介绍" tabindex="-1"><a class="header-anchor" href="#介绍" aria-hidden="true">#</a> 介绍</h2><p>webpack 启用 swc构建速度更快</p><h2 id="启用方式" tabindex="-1"><a class="header-anchor" href="#启用方式" aria-hidden="true">#</a> 启用方式</h2><p>在 <code>package.json</code> 中引入依赖:</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span>
<span class="token property">&quot;dependencies&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token property">&quot;@fesjs/fes&quot;</span><span class="token operator">:</span> <span class="token string">&quot;^3.0.0&quot;</span><span class="token punctuation">,</span>
<span class="token property">&quot;@fesjs/plugin-swc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;^3.0.0&quot;</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h2 id="编译时配置" tabindex="-1"><a class="header-anchor" href="#编译时配置" aria-hidden="true">#</a> 编译时配置</h2>`,7),d={href:"https://swc.rs/docs/configuration/swcrc",target:"_blank",rel:"noopener noreferrer"},u=a(`<div class="language-javascript line-numbers-mode" data-ext="js"><pre class="language-javascript"><code><span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
<span class="token literal-property property">swc</span><span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token literal-property property">loader</span><span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token literal-property property">env</span><span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token literal-property property">coreJs</span><span class="token operator">:</span> <span class="token string">&#39;3.27&#39;</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div>`,1);function k(v,h){const e=o("ExternalLinkIcon");return p(),c("div",null,[l,s("p",null,[n("传对象时使用swc进行编译和压缩"),s("a",d,[n("loader配置"),r(e)]),n("默认usage模式。")]),u])}const b=t(i,[["render",k],["__file","swc.html.vue"]]);export{b as default};