Skip to main content

enableTailwind()

可从 v4.0.256 获取

🌐 available from v4.0.256

一个修改默认 Webpack 配置的函数,以进行必要的更改以支持 TailwindCSS。请参阅 setup 查看在 Remotion 中设置 TailwindCSS 的完整说明。

🌐 A function that modifies the default Webpack configuration to make the necessary changes to support TailwindCSS. See the setup to see full instructions on how to setup TailwindCSS in Remotion.

remotion.config.ts
import {Config} from '@remotion/cli/config'; import {enableTailwind} from '@remotion/tailwind-v4'; Config.overrideWebpackConfig((currentConfiguration) => { return enableTailwind(currentConfiguration); });

多个 Webpack 变更

🌐 Multiple Webpack changes

如果你想进行其他配置更改,你可以通过类似 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 {enableTailwind} from '@remotion/tailwind-v4'; Config.overrideWebpackConfig((currentConfiguration) => { return enableTailwind({ ...currentConfiguration, // Make other changes }); });