🎥 Make videos programmatically with React
enable scss
Jonny Burgera27d80c10cb7
diff --git a/packages/cli/package.json b/packages/cli/package.jsonindex 0480cd91fd..e7178728e2 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -60,6 +60,7 @@"@types/react-dom": "18.3.0","@remotion/zod-types": "workspace:*","@remotion/tailwind": "workspace:*",+ "@remotion/enable-scss": "workspace:*","@remotion/skia": "workspace:*","eslint": "8.56.0","eslint-plugin-10x": "1.5.2",diff --git a/packages/compositor-darwin-arm64/remotion b/packages/compositor-darwin-arm64/remotionindex 6067b9a8cc..1ad855df38 100755Binary files a/packages/compositor-darwin-arm64/remotion and b/packages/compositor-darwin-arm64/remotion differdiff --git a/packages/create-video/src/list-of-remotion-packages.ts b/packages/create-video/src/list-of-remotion-packages.tsindex 19b71d0fca..9098e03294 100644--- a/packages/create-video/src/list-of-remotion-packages.ts+++ b/packages/create-video/src/list-of-remotion-packages.ts@@ -10,6 +10,7 @@ export const listOfRemotionPackages = ['@remotion/skia','@remotion/lottie','@remotion/media-utils',+ '@remotion/enable-scss','@remotion/motion-blur','@remotion/google-fonts','@remotion/noise',diff --git a/packages/example/package.json b/packages/example/package.jsonindex ca8bdbe6c2..17f3155a6b 100644--- a/packages/example/package.json+++ b/packages/example/package.json@@ -49,6 +49,7 @@"@remotion/rive": "workspace:*","@remotion/shapes": "workspace:*","@remotion/skia": "workspace:*",+ "@remotion/enable-scss": "workspace:*","@remotion/studio": "workspace:*","@remotion/tailwind": "workspace:*","@remotion/three": "workspace:*",@@ -79,7 +80,11 @@"ts-unused-exports": "^7.0.1","use-asset": "^1.0.4","vitest": "0.31.1",- "zod": "3.22.3"+ "zod": "3.22.3",+ "style-loader": "2.0.0",+ "css-loader": "5.2.7",+ "sass-loader": "14.2.1",+ "sass": "1.77.2"},"devDependencies": {"eslint": "8.56.0",diff --git a/packages/example/remotion.config.ts b/packages/example/remotion.config.tsindex 56b0ff0906..00a462372e 100644--- a/packages/example/remotion.config.ts+++ b/packages/example/remotion.config.ts@@ -1,4 +1,5 @@import {Config} from '@remotion/cli/config';+import {enableScss} from '@remotion/enable-scss';import {webpackOverride} from './src/webpack-override.mjs';Config.setOverwriteOutput(true);@@ -6,5 +7,5 @@ Config.overrideWebpackConfig(async (config) => {await new Promise((resolve) => {setTimeout(resolve, 10);});- return webpackOverride(config);+ return enableScss(await webpackOverride(config));});diff --git a/packages/example/src/Root.tsx b/packages/example/src/Root.tsxindex 13f0561155..8f3e3cf777 100644--- a/packages/example/src/Root.tsx+++ b/packages/example/src/Root.tsx@@ -88,11 +88,17 @@ import {WarpDemoOuter} from './WarpText';import {WarpDemo2} from './WarpText/demo2';import './style.css';import {WatchStaticDemo} from './watch-static';-if (alias !== 'alias') {throw new Error('should support TS aliases');}+// @ts-expect-error no types+import styles from './styles.module.scss';++if (!styles.hithere) {+ throw new Error('should support SCSS modules');+}+// Use it to test that UI does not regress on weird CSS// import './weird-css.css';diff --git a/packages/example/src/styles.module.scss b/packages/example/src/styles.module.scssnew file mode 100644index 0000000000..38788f4741--- /dev/null+++ b/packages/example/src/styles.module.scss@@ -0,0 +1,5 @@+.container {+ .hithere {+ background-color: blue;+ }+}diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex a7f815f962..04cb200fc6 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -280,6 +280,9 @@ importers:'@jonny/eslint-config':specifier: 3.0.281version: 3.0.281([email protected])([email protected])+ '@remotion/enable-scss':+ specifier: workspace:*+ version: link:../enable-scss'@remotion/skia':specifier: workspace:*version: link:../skia@@ -815,7 +818,7 @@ importers:version: 5.2.7([email protected])sass-loader:specifier: 14.2.1- version: 14.2.1([email protected])+ version: 14.2.1([email protected])([email protected])style-loader:specifier: 2.0.0version: 2.0.0([email protected])@@ -906,6 +909,9 @@ importers:'@remotion/cloudrun':specifier: workspace:*version: link:../cloudrun+ '@remotion/enable-scss':+ specifier: workspace:*+ version: link:../enable-scss'@remotion/eslint-config':specifier: workspace:*version: link:../eslint-config@@ -1002,6 +1008,9 @@ importers:babel-loader:specifier: ^8.2.2version: 8.2.2(@babel/[email protected])([email protected])+ css-loader:+ specifier: 5.2.7+ version: 5.2.7([email protected])dotenv:specifier: 9.0.2version: 9.0.2@@ -1032,6 +1041,15 @@ importers:remotion:specifier: workspace:*version: link:../core+ sass:+ specifier: 1.77.2+ version: 1.77.2+ sass-loader:+ specifier: 14.2.1+ version: 14.2.1([email protected])([email protected])+ style-loader:+ specifier: 2.0.0+ version: 2.0.0([email protected])styled-components:specifier: ^5.3.6@@ -1046,7 +1064,7 @@ importers:version: 1.0.4([email protected])vitest:specifier: 0.31.1- version: 0.31.1([email protected])([email protected])+ version: 0.31.1([email protected])zod:specifier: 3.22.3version: 3.22.3@@ -1264,7 +1282,7 @@ importers:version: 0.32.6vite:specifier: ^4.5.3- version: 4.5.3(@types/[email protected])+ version: 4.5.3(@types/[email protected])([email protected])vitest:specifier: 0.31.1version: 0.31.1([email protected])([email protected])@@ -11091,7 +11109,6 @@ packages:dependencies:normalize-path: 3.0.0picomatch: 2.3.1- dev: falseresolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==}@@ -11582,7 +11599,6 @@ packages:resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==}engines: {node: '>=8'}- dev: falseresolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==}@@ -12016,7 +12032,6 @@ packages:readdirp: 3.6.0optionalDependencies:fsevents: 2.3.3- dev: falseresolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==}@@ -15574,6 +15589,9 @@ packages:resolution: {integrity: sha512-lk7UNmSbAukB5B6dh9fnh5D0bJTOFKxVg2cyJWTYrWRfhLrLMBquONcUs3aFq507hNoIZEDDh8lb8UtOizSMhA==}dev: false+ resolution: {integrity: sha512-Ju0+lEMyzMVZarkTn/gqRpdqd5dOPaz1mCZ0SH3JV6iFw81PldE/PEB1hWVEA288HPt4WXW8O7AWxB10M+03QQ==}+resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==}engines: {node: '>=6'}@@ -15733,7 +15751,6 @@ packages:engines: {node: '>=8'}dependencies:binary-extensions: 2.2.0- dev: falseresolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==}@@ -17826,7 +17843,6 @@ packages:resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}engines: {node: '>=0.10.0'}- dev: falseresolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==}@@ -19921,7 +19937,6 @@ packages:engines: {node: '>=8.10.0'}dependencies:picomatch: 2.3.1- dev: falseresolution: {integrity: sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==}@@ -20487,7 +20502,7 @@ packages:suf-log: 2.5.3dev: falseresolution: {integrity: sha512-G0VcnMYU18a4N7VoNDegg2OuMjYtxnqzQWARVWCIVSZwJeiL9kg8QMsuIZOplsJgTzZLF6jGxI3AClj8I9nRdQ==}engines: {node: '>= 18.12.0'}peerDependencies:@@ -20509,9 +20524,19 @@ packages:optional: truedependencies:neo-async: 2.6.2+ sass: 1.77.2webpack: 5.83.1dev: false+ resolution: {integrity: sha512-eb4GZt1C3avsX3heBNlrc7I09nyT00IUuo4eFhAbeXWU2fvA7oXI53SxODVAA+zgZCk9aunAZgO+losjR3fAwA==}+ engines: {node: '>=14.0.0'}+ hasBin: true+ dependencies:+ chokidar: 3.5.3+ immutable: 4.3.6+ source-map-js: 1.0.2+resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==}dev: false@@ -22727,7 +22752,7 @@ packages:vfile-message: 3.1.4dev: false- /[email protected](@types/[email protected]):resolution: {integrity: sha512-BajE/IsNQ6JyizPzu9zRgHrBwczkAs0erQf/JRpgTIESpKvNj9/Gd0vxX905klLkb0I0SJVCKbdrl5c6FnqYKA==}engines: {node: '>=v14.18.0'}hasBin: true@@ -22737,7 +22762,7 @@ packages:mlly: 1.5.0pathe: 1.1.2picocolors: 1.0.0- vite: 4.5.3(@types/[email protected])+ vite: 4.5.3(@types/[email protected])([email protected])transitivePeerDependencies:- '@types/node'- less@@ -22818,7 +22843,7 @@ packages:fsevents: 2.3.3dev: false- /[email protected](@types/[email protected]):resolution: {integrity: sha512-kQL23kMeX92v3ph7IauVkXkikdDRsYMGTVl5KY2E9OY4ONLvkHf04MDTbnfo6NKxZiDLWzVpP5oTa8hQD8U3dg==}engines: {node: ^14.18.0 || >=16.0.0}hasBin: true@@ -22850,6 +22875,7 @@ packages:esbuild: 0.18.20postcss: 8.4.33rollup: 3.29.4+ sass: 1.77.2optionalDependencies:fsevents: 2.3.3@@ -22919,8 +22945,8 @@ packages:strip-literal: 1.3.0tinybench: 2.6.0tinypool: 0.5.0- vite: 4.5.3(@types/[email protected])- vite-node: 0.31.1(@types/[email protected])+ vite: 4.5.3(@types/[email protected])([email protected])+ vite-node: 0.31.1(@types/[email protected])([email protected])why-is-node-running: 2.2.2transitivePeerDependencies:- less@@ -22985,8 +23011,8 @@ packages:strip-literal: 1.3.0tinybench: 2.6.0tinypool: 0.5.0- vite: 4.5.3(@types/[email protected])- vite-node: 0.31.1(@types/[email protected])+ vite: 4.5.3(@types/[email protected])([email protected])+ vite-node: 0.31.1(@types/[email protected])([email protected])why-is-node-running: 2.2.2transitivePeerDependencies:- less@@ -23052,8 +23078,8 @@ packages:strip-literal: 1.3.0tinybench: 2.6.0tinypool: 0.5.0- vite: 4.5.3(@types/[email protected])- vite-node: 0.31.1(@types/[email protected])+ vite: 4.5.3(@types/[email protected])([email protected])+ vite-node: 0.31.1(@types/[email protected])([email protected])why-is-node-running: 2.2.2transitivePeerDependencies:- less@@ -23065,6 +23091,72 @@ packages:- terserdev: true+ resolution: {integrity: sha512-/dOoOgzoFk/5pTvg1E65WVaobknWREN15+HF+0ucudo3dDG/vCZoXTQrjIfEaWvQXmqScwkRodrTbM/ScMpRcQ==}+ engines: {node: '>=v14.18.0'}+ hasBin: true+ peerDependencies:+ '@edge-runtime/vm': '*'+ '@vitest/browser': '*'+ '@vitest/ui': '*'+ happy-dom: '*'+ jsdom: '*'+ playwright: '*'+ safaridriver: '*'+ webdriverio: '*'+ peerDependenciesMeta:+ '@edge-runtime/vm':+ optional: true+ '@vitest/browser':+ optional: true+ '@vitest/ui':+ optional: true+ happy-dom:+ optional: true+ jsdom:+ optional: true+ playwright:+ optional: true+ safaridriver:+ optional: true+ webdriverio:+ optional: true+ dependencies:+ '@types/chai': 4.3.11+ '@types/chai-subset': 1.3.5+ '@types/node': 18.14.6+ '@vitest/expect': 0.31.1+ '@vitest/runner': 0.31.1+ '@vitest/snapshot': 0.31.1+ '@vitest/spy': 0.31.1+ '@vitest/utils': 0.31.1+ acorn: 8.11.3+ acorn-walk: 8.3.2+ cac: 6.7.14+ chai: 4.4.1+ concordance: 5.0.4+ debug: 4.3.4([email protected])+ local-pkg: 0.4.3+ magic-string: 0.30.5+ pathe: 1.1.2+ picocolors: 1.0.0+ std-env: 3.7.0+ strip-literal: 1.3.0+ tinybench: 2.6.0+ tinypool: 0.5.0+ vite: 4.5.3(@types/[email protected])([email protected])+ vite-node: 0.31.1(@types/[email protected])([email protected])+ why-is-node-running: 2.2.2+ transitivePeerDependencies:+ - less+ - lightningcss+ - sass+ - stylus+ - sugarss+ - supports-color+ - terser+ dev: false+resolution: {integrity: sha512-9UG0s3Ss8rbaaPZL1AkGzdjrGY8F+P+Ne9snsrvD9gxltDGhsn8C2dQpqQewHrMW37OvlqJoI8sUU2AWDb+qNw==}dependencies:diff --git a/tsconfig.json b/tsconfig.jsonindex eca5a18572..23053248db 100644--- a/tsconfig.json+++ b/tsconfig.json@@ -132,6 +132,9 @@{"path": "./packages/video-parser"},+ {+ "path": "./packages/enable-scss"+ },{"path": "./packages/zod-types"}