Vite 是 Strapi 5 中的默认打包器
🌐 Vite is the default bundler in Strapi 5
Page summary:在 Strapi 5 中,Vite 取代了 webpack 成为默认的打包器。拥有自定义 webpack 配置的用户可以转换为 Vite 配置,或者使用
--bundler=webpack来保持 v4 的行为。🌐 In Strapi 5, Vite replaces webpack as the default bundler. Users with custom webpack configurations can convert to Vite configurations or use
--bundler=webpackto maintain v4 behavior.
在 Strapi 5 中,Vite 是默认的打包器。
🌐 In Strapi 5, Vite is the default bundler.
此页面是重大更改数据库的一部分,提供关于重大更改的信息以及从 Strapi v4 迁移到 Strapi 5 的附加说明。
🌐 This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.
重大变更描述
🌐 Breaking change description
在 Strapi v4 中
Webpack 是默认的打包器。
🌐 Webpack is the default bundler.
在 Strapi 5 中
Vite 是默认的打包工具。
迁移
🌐 Migration
本节重新组合了有关引入的重大更改的有用说明和程序。
🌐 This section regroups useful notes and procedures about the introduced breaking change.
手动操作
🌐 Manual procedure
具有自定义 webpack 配置的用户需要转换为 Vite 配置,或者在启动开发服务器时设置 --bundler=webpack 以保持 Strapi v4 的行为;在后一种情况下,终端将发出警告。有关更多详细信息,请参阅 bundlers 文档。