mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
17 lines
3.5 KiB
JavaScript
17 lines
3.5 KiB
JavaScript
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">"dependencies"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
||
<span class="token property">"@fesjs/fes"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</span><span class="token punctuation">,</span>
|
||
<span class="token property">"@fesjs/plugin-swc"</span><span class="token operator">:</span> <span class="token string">"^3.0.0"</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">'3.27'</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};
|