纯 JavaScript
自 Remotion 1.3 起,你可以选择不使用 Typescript 及其在 Remotion 中的类型检查优势。继续操作请自行承担风险。
🌐 Since Remotion 1.3, you can opt out of Typescript and it's type checking advantages in Remotion. Continue at your own risk.
选择退出 Typescript
🌐 Opting out of Typescript
你可以像平常一样导入 .js 和 .jsx 文件。如果你想完全迁移到 JS,将 index.ts 和 Root.tsx 重命名为拥有 .jsx 文件扩展名。移除像 React.FC 和 SpringConfig 这样的类型。
🌐 You may import .js and .jsx files as normal. If you would like to completely move to JS, rename index.ts and Root.tsx so they have a .jsx file extension. Remove types such as React.FC and SpringConfig.
升级
🌐 Upgrading
如果你从 Remotion 1.2 或更早版本升级,考虑将 npm test 命令修改为也包括 JavaScript 文件,并移除 tsc 命令:
🌐 If you upgrade from Remotion 1.2 or older, consider changing the npm test command to also include JavaScript files, and to remove the tsc command:
- "test": "eslint src --ext ts,tsx && tsc"
+ "test": "eslint src --ext ts,tsx,js,jsx"另请参阅
🌐 See also
- 自定义 Webpack 配置 用于更高级的调整