import{_ as s,o as a,c as n,V as l}from"./chunks/framework.b31a4d00.js";const d=JSON.parse('{"title":"@fesjs/plugin-swc","description":"","frontmatter":{},"headers":[],"relativePath":"reference/plugin/plugins/swc.md"}'),o={name:"reference/plugin/plugins/swc.md"},p=l(`
webpack 启用 swc,构建速度更快!
在 package.json
中引入依赖:
{
"dependencies": {
"@fesjs/fes": "^3.0.0",
"@fesjs/plugin-swc": "^3.0.0"
},
}
传对象时使用swc进行编译和压缩,loader配置,默认usage模式。
export default {
swc: {
loader: {
env: {
coreJs: '3.27',
},
}
},
}