Skip to content

使用 SWC 插件 #10

Description

@SyMind

目前项目通过 babel 插件在 Next.js 编译时适配 Taro 代码,导致 Next.js 在编译时无法使用 SWC 来提升编译速度。现在 SWC 已经支持插件,可以将这些 babel 插件转为 SWC 插件,让 Next.js 能够使用 SWC 来加速编译。

SWC 文档:https://swc.rs/docs/plugin/ecmascript/getting-started
Next.js 文档:https://nextjs.org/docs/advanced-features/compiler#swc-plugins-experimental

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions