Skip to content

🎥 Make videos programmatically with React

meeting

Jonny Burgerff6f713e9dad
diff --git a/packages/motion-blur/package.json b/packages/motion-blur/package.json
index 9749857a4c..a6993e6cf5 100644
--- a/packages/motion-blur/package.json
+++ b/packages/motion-blur/package.json
@@ -2,8 +2,8 @@
"name": "@remotion/motion-blur",
"version": "3.3.62",
"description": "Motion blur effect for Remotion",
- "main": "dist/index.js",
- "types": "dist/index.d.ts",
+ "main": "dist/esm/index.mjs",
+ "types": "dist/cjs/index.d.ts",
"sideEffects": false,
"scripts": {
"lint": "eslint src --ext ts,tsx",
diff --git a/packages/motion-blur/rollup.config.js b/packages/motion-blur/rollup.config.js
index 60c3873b68..145571d05a 100644
--- a/packages/motion-blur/rollup.config.js
+++ b/packages/motion-blur/rollup.config.js
@@ -11,7 +11,7 @@ export default [
sourcemap: false,
},
],
- external: ['react', 'remotion', 'react/jsx-runtime', 'lottie-web'],
+ external: ['react', 'remotion', 'react/jsx-runtime'],
plugins: [
typescript({
tsconfig: 'tsconfig-esm.json',
diff --git a/packages/noise/package.json b/packages/noise/package.json
index 29f03a7fb8..2d6d5b5765 100644
--- a/packages/noise/package.json
+++ b/packages/noise/package.json
@@ -2,15 +2,25 @@
"name": "@remotion/noise",
"version": "3.3.62",
"description": "Noise effect for Remotion",
- "main": "dist/index.js",
- "types": "dist/index.d.ts",
+ "main": "dist/cjs/index.js",
+ "types": "dist/cjs/index.d.ts",
+ "module": "dist/esm/index.mjs",
"sideEffects": false,
"scripts": {
"lint": "eslint src --ext ts,tsx",
"watch": "tsc -w",
- "build": "tsc -d",
+ "build": "rollup --config rollup.config.js && tsc -d",
"test": "vitest --run"
},
+ "exports": {
+ "./package.json": "./package.json",
+ ".": {
+ "types": "./dist/cjs/index.d.ts",
+ "module": "./dist/esm/index.mjs",
+ "import": "./dist/esm/index.mjs",
+ "require": "./dist/cjs/index.js"
+ }
+ },
"author": "Yehor Misiats (https://github.com/satelllte)",
"maintainers": [
"Jonny Burger <[email protected]>",
@@ -29,12 +39,14 @@
"simplex-noise": "4.0.1"
},
"devDependencies": {
+ "@rollup/plugin-typescript": "^8.2.0",
"@jonny/eslint-config": "^3.0.266",
"@types/node": "^16.7.5",
"eslint": "8.25.0",
"prettier": "^2.7.1",
"prettier-plugin-organize-imports": "^2.3.4",
"typescript": "^4.7.0",
+ "rollup": "^2.70.1",
"vitest": "0.24.3"
},
"keywords": [
diff --git a/packages/noise/rollup.config.js b/packages/noise/rollup.config.js
new file mode 100644
index 0000000000..29e9e02725
--- /dev/null
+++ b/packages/noise/rollup.config.js
@@ -0,0 +1,23 @@
+// rollup.config.js
+import typescript from '@rollup/plugin-typescript';
+
+export default [
+ {
+ input: 'src/index.ts',
+ output: [
+ {
+ file: 'dist/esm/index.mjs',
+ format: 'es',
+ sourcemap: false,
+ },
+ ],
+ external: ['react', 'remotion', 'react/jsx-runtime', 'simplex-noise'],
+ plugins: [
+ typescript({
+ tsconfig: 'tsconfig-esm.json',
+ sourceMap: false,
+ outputToFilesystem: true,
+ }),
+ ],
+ },
+];
diff --git a/packages/noise/tsconfig-esm.json b/packages/noise/tsconfig-esm.json
new file mode 100644
index 0000000000..945ca02476
--- /dev/null
+++ b/packages/noise/tsconfig-esm.json
@@ -0,0 +1,12 @@
+{
+ "extends": "../tsconfig-esm.settings.json",
+ "compilerOptions": {
+ "composite": true,
+ "rootDir": "./src",
+ "outDir": "./dist/esm",
+ "skipLibCheck": true,
+ "jsx": "react-jsx",
+ "moduleResolution": "node"
+ },
+ "include": ["./src"]
+}
diff --git a/packages/noise/tsconfig.json b/packages/noise/tsconfig.json
index 402f70f469..8e4a6149e0 100644
--- a/packages/noise/tsconfig.json
+++ b/packages/noise/tsconfig.json
@@ -3,7 +3,7 @@
"compilerOptions": {
"composite": true,
"rootDir": "src",
- "outDir": "dist",
+ "outDir": "dist/cjs",
"skipLibCheck": true
},
"include": ["src"],
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 62de0f7b49..fcc9df73da 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -807,11 +807,13 @@ importers:
packages/noise:
specifiers:
'@jonny/eslint-config': ^3.0.266
+ '@rollup/plugin-typescript': ^8.2.0
'@types/node': ^16.7.5
eslint: 8.25.0
prettier: ^2.7.1
prettier-plugin-organize-imports: ^2.3.4
remotion: 3.3.62
+ rollup: ^2.70.1
simplex-noise: 4.0.1
typescript: ^4.7.0
vitest: 0.24.3
@@ -820,10 +822,12 @@ importers:
simplex-noise: 4.0.1
devDependencies:
'@jonny/eslint-config': 3.0.266_t54va6jeo5lf3vtqih5uiyrm5e
+ '@rollup/plugin-typescript': 8.5.0_2s5nfqwcf62746iqzotp3mpuy4
'@types/node': 16.10.2
eslint: 8.25.0
prettier: 2.7.1
prettier-plugin-organize-imports: 2.3.4_j2odc4yr77iddtreafyicbq5hi
+ rollup: 2.76.0
typescript: 4.7.2
vitest: 0.24.3
@@ -24854,8 +24858,8 @@ packages:
'@webassemblyjs/ast': 1.11.1
'@webassemblyjs/wasm-edit': 1.11.1
'@webassemblyjs/wasm-parser': 1.11.1
- acorn: 8.8.0
- acorn-import-assertions: [email protected]
+ acorn: 8.8.1
+ acorn-import-assertions: [email protected]
browserslist: 4.21.4
chrome-trace-event: 1.0.3
enhanced-resolve: 5.10.0