Skip to main content

enableSkia()

一个修改默认 Webpack 配置以进行必要更改以支持 Skia 的函数。

🌐 A function that modifies the default Webpack configuration to make the necessary changes to support Skia.

remotion.config.ts
import { Config } from "@remotion/cli/config"; import { enableSkia } from "@remotion/skia/enable"; Config.overrideWebpackConfig((currentConfiguration) => { return enableSkia(currentConfiguration); });
note

v3.3.39 之前,该选项被称为 Config.Bundling.overrideWebpackConfig()

如果你想进行其他配置更改,你可以通过类似 reducer 的方式来操作:

🌐 If you want to make other configuration changes, you can do so by doing them reducer-style:

remotion.config.ts
import { Config } from "@remotion/cli/config"; import { enableSkia } from "@remotion/skia/enable"; Config.overrideWebpackConfig((currentConfiguration) => { return enableSkia({ ...currentConfiguration, // Make other changes }); });
note

v3.3.39 之前,该选项被称为 Config.Bundling.overrideWebpackConfig()

请参阅设置以查看在 Remotion 中设置 React Native Skia 的完整说明。

🌐 See the setup to see full instructions on how to setup React Native Skia in Remotion.