@remotion/bundler 4.0.522 → 4.0.524

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -251,6 +251,10 @@ const internalBundle = async (actualArgs) => {
251
251
  }
252
252
  }
253
253
  }
254
+ const bundleOutput = node_path_1.default.join(outDir, no_react_1.NoReactInternals.bundleName);
255
+ if (!node_fs_1.default.existsSync(bundleOutput)) {
256
+ throw new Error(`The bundler completed without emitting ${no_react_1.NoReactInternals.bundleName}.`);
257
+ }
254
258
  const publicPath = (0, exports.getBundlePublicPath)(actualArgs.publicPath);
255
259
  const staticHash = (0, exports.getBundleStaticHash)(publicPath);
256
260
  const from = (options === null || options === void 0 ? void 0 : options.publicDir)
@@ -290,6 +294,7 @@ const internalBundle = async (actualArgs) => {
290
294
  }
291
295
  }
292
296
  const html = (0, index_html_1.indexHtml)({
297
+ importMap: null,
293
298
  staticHash,
294
299
  publicPath,
295
300
  editorName: null,
package/dist/index.d.ts CHANGED
@@ -30,7 +30,7 @@ export declare const BundlerInternals: {
30
30
  extraPlugins: any[];
31
31
  }) => Promise<[string, import("@rspack/core").RspackOptions]>;
32
32
  createRspackCompiler: (config: import("@rspack/core").RspackOptions) => import("@rspack/core").Compiler;
33
- indexHtml: ({ publicPath, editorName, inputProps, envVariables, staticHash, remotionRoot, studioServerCommand, renderQueue, completedClientRenders, numberOfAudioTags, publicFiles, includeFavicon, title, renderDefaults, publicFolderExists, fileSystemPlatform, gitSource, projectName, installedDependencies, packageManager, audioLatencyHint, experimentalKeepAudioContextAlive, sampleRate, logLevel, mode, bundleScriptUrl, bundleScriptType, readOnlyStudio, studioRuntimeConfig, }: import("@remotion/studio-shared").StudioHtmlOptions) => string;
33
+ indexHtml: ({ publicPath, editorName, inputProps, envVariables, staticHash, remotionRoot, studioServerCommand, renderQueue, completedClientRenders, numberOfAudioTags, publicFiles, includeFavicon, title, renderDefaults, publicFolderExists, fileSystemPlatform, gitSource, projectName, installedDependencies, packageManager, audioLatencyHint, experimentalKeepAudioContextAlive, sampleRate, logLevel, mode, bundleScriptUrl, bundleScriptType, importMap, readOnlyStudio, studioRuntimeConfig, }: import("@remotion/studio-shared").StudioHtmlOptions) => string;
34
34
  cacheExists: (remotionRoot: string, environment: "development" | "production", hash: string) => "does-not-exist" | "exists" | "other-exists";
35
35
  clearCache: (remotionRoot: string, env: "development" | "production") => Promise<void>;
36
36
  getConfig: ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, options, }: {
@@ -1,5 +1,14 @@
1
1
  import type { Compiler } from 'webpack';
2
2
  export declare class AllowOptionalDependenciesPlugin {
3
- filter(error: Error): boolean;
3
+ filter(error: Error & {
4
+ module?: {
5
+ resource?: string;
6
+ resourceResolveData?: {
7
+ descriptionFileData?: {
8
+ name?: string;
9
+ };
10
+ };
11
+ };
12
+ }): boolean;
4
13
  apply(compiler: Compiler): void;
5
14
  }
@@ -2,23 +2,40 @@
2
2
  // When Webpack cannot resolve these dependencies, it will not print an error message.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.AllowOptionalDependenciesPlugin = void 0;
5
+ const studio_shared_1 = require("@remotion/studio-shared");
5
6
  const OPTIONAL_DEPENDENCIES = [
6
7
  'zod',
7
8
  '@remotion/zod-types',
8
9
  'react-native-reanimated',
9
10
  'react-native-reanimated/package.json',
10
11
  ];
12
+ const STUDIO_OPTIONAL_DEPENDENCIES = [
13
+ '@remotion/whisper-webgpu',
14
+ '@remotion/video-matting',
15
+ ];
11
16
  const SOURCE_MAP_IGNORE = ['path', 'fs'];
12
17
  class AllowOptionalDependenciesPlugin {
13
18
  filter(error) {
19
+ var _a, _b, _c, _d, _e;
20
+ var _f;
21
+ const message = (0, studio_shared_1.stripAnsi)(error.message);
14
22
  for (const dependency of OPTIONAL_DEPENDENCIES) {
15
- if (error.message.includes(`Can't resolve '${dependency}'`)) {
23
+ if (message.includes(`Can't resolve '${dependency}'`)) {
24
+ return false;
25
+ }
26
+ }
27
+ const issuer = (_f = (_b = (_a = error.module) === null || _a === void 0 ? void 0 : _a.resource) === null || _b === void 0 ? void 0 : _b.replaceAll('\\', '/')) !== null && _f !== void 0 ? _f : '';
28
+ const issuerPackageName = (_e = (_d = (_c = error.module) === null || _c === void 0 ? void 0 : _c.resourceResolveData) === null || _d === void 0 ? void 0 : _d.descriptionFileData) === null || _e === void 0 ? void 0 : _e.name;
29
+ for (const dependency of STUDIO_OPTIONAL_DEPENDENCIES) {
30
+ if (message.includes(`Can't resolve '${dependency}'`) &&
31
+ (issuerPackageName === '@remotion/studio' ||
32
+ issuer.includes('/@remotion/studio/'))) {
16
33
  return false;
17
34
  }
18
35
  }
19
36
  for (const dependency of SOURCE_MAP_IGNORE) {
20
- if (error.message.includes(`Can't resolve '${dependency}'`) &&
21
- error.message.includes('source-map')) {
37
+ if (message.includes(`Can't resolve '${dependency}'`) &&
38
+ message.includes('source-map')) {
22
39
  return false;
23
40
  }
24
41
  }
@@ -7,6 +7,7 @@ exports.createRspackCompiler = exports.rspackConfig = void 0;
7
7
  const studio_entry_points_1 = require("@remotion/studio-shared/studio-entry-points");
8
8
  const core_1 = require("@rspack/core");
9
9
  const plugin_react_refresh_1 = __importDefault(require("@rspack/plugin-react-refresh"));
10
+ const optional_dependencies_1 = require("./optional-dependencies");
10
11
  const react_scan_entry_point_1 = require("./react-scan-entry-point");
11
12
  const shared_bundler_config_1 = require("./shared-bundler-config");
12
13
  const rspackConfig = async ({ entry, userDefinedComponent, outDir, environment, bundlerOverride = (f) => f, rspackOverride = (f) => f, onProgress, enableCaching = true, remotionRoot, poll, extraPlugins, }) => {
@@ -46,6 +47,12 @@ const rspackConfig = async ({ entry, userDefinedComponent, outDir, environment,
46
47
  const sharedBaseConfig = (0, shared_bundler_config_1.getBaseConfig)(environment, poll);
47
48
  const baseConfig = {
48
49
  ...sharedBaseConfig,
50
+ optimization: {
51
+ ...sharedBaseConfig.optimization,
52
+ // The optional dependency plugin removes expected resolution errors after
53
+ // compilation. Rspack must emit their throwing fallback chunks first.
54
+ emitOnErrors: true,
55
+ },
49
56
  experiments: {
50
57
  ...sharedBaseConfig.experiments,
51
58
  ...(environment === 'development'
@@ -81,6 +88,7 @@ const rspackConfig = async ({ entry, userDefinedComponent, outDir, environment,
81
88
  ? [
82
89
  new plugin_react_refresh_1.default({ overlay: false }),
83
90
  new core_1.rspack.HotModuleReplacementPlugin(),
91
+ new optional_dependencies_1.AllowOptionalDependenciesPlugin(),
84
92
  ...extraPlugins,
85
93
  ]
86
94
  : [
@@ -92,6 +100,7 @@ const rspackConfig = async ({ entry, userDefinedComponent, outDir, environment,
92
100
  }
93
101
  }
94
102
  }),
103
+ new optional_dependencies_1.AllowOptionalDependenciesPlugin(),
95
104
  ],
96
105
  output: (0, shared_bundler_config_1.getOutputConfig)(environment),
97
106
  resolve: (0, shared_bundler_config_1.getResolveConfig)(),
@@ -73,6 +73,11 @@ exports.injectCSS = injectCSS;
73
73
  color: #0584f2
74
74
  }
75
75
 
76
+ .__remotion-vertical-scrollbar::-webkit-scrollbar-corner,
77
+ .__remotion-horizontal-scrollbar::-webkit-scrollbar-corner {
78
+ background: transparent;
79
+ }
80
+
76
81
  .__remotion-vertical-scrollbar {
77
82
  scrollbar-gutter: stable;
78
83
  }
@@ -9,7 +9,6 @@ export declare const getResolveConfig: () => {
9
9
  'remotion/version': string;
10
10
  remotion: string;
11
11
  '@remotion/media-parser/worker'?: string | undefined;
12
- '@remotion/studio': string;
13
12
  'react-dom/client': string;
14
13
  };
15
14
  };
@@ -36,8 +36,21 @@ const getResolveConfig = () => ({
36
36
  : {
37
37
  '@remotion/media-parser/worker': node_path_1.default.resolve(require.resolve('@remotion/media-parser'), '..', 'esm', 'worker.mjs'),
38
38
  }),
39
- // test visual controls before removing this
40
- '@remotion/studio': require.resolve('@remotion/studio'),
39
+ // Studio entry points are also passed to the bundler as resolved CJS paths.
40
+ // Route both those paths and package imports through the same ESM build.
41
+ ...Object.fromEntries([
42
+ '@remotion/studio',
43
+ '@remotion/studio/internals',
44
+ '@remotion/studio/previewEntry',
45
+ '@remotion/studio/renderEntry',
46
+ ].flatMap((specifier) => {
47
+ const commonJsPath = require.resolve(specifier);
48
+ const esmPath = node_path_1.default.join(node_path_1.default.dirname(commonJsPath), 'esm', node_path_1.default.basename(commonJsPath, '.js') + '.mjs');
49
+ return [
50
+ [`${specifier}$`, esmPath],
51
+ [commonJsPath, esmPath],
52
+ ];
53
+ })),
41
54
  [node_path_1.default.join(require.resolve('@remotion/timeline-utils'), '..', 'audio-waveform-worker.mjs')]: node_path_1.default.join(require.resolve('@remotion/timeline-utils'), '..', 'esm', 'audio-waveform-worker.mjs'),
42
55
  'react-dom/client': exports.shouldUseReactDomClient
43
56
  ? require.resolve('react-dom/client')
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/bundler"
4
4
  },
5
5
  "name": "@remotion/bundler",
6
- "version": "4.0.522",
6
+ "version": "4.0.524",
7
7
  "description": "Bundle Remotion compositions using Webpack",
8
8
  "main": "dist/index.js",
9
9
  "bugs": {
@@ -24,11 +24,11 @@
24
24
  "css-loader": "7.1.4",
25
25
  "esbuild": "0.28.1",
26
26
  "react-refresh": "0.18.0",
27
- "remotion": "4.0.522",
28
- "@remotion/studio": "4.0.522",
29
- "@remotion/studio-shared": "4.0.522",
30
- "@remotion/timeline-utils": "4.0.522",
31
- "@remotion/media-parser": "4.0.522",
27
+ "remotion": "4.0.524",
28
+ "@remotion/studio": "4.0.524",
29
+ "@remotion/studio-shared": "4.0.524",
30
+ "@remotion/timeline-utils": "4.0.524",
31
+ "@remotion/media-parser": "4.0.524",
32
32
  "style-loader": "4.0.0",
33
33
  "webpack": "5.105.0"
34
34
  },
@@ -39,7 +39,7 @@
39
39
  "devDependencies": {
40
40
  "react": "19.2.3",
41
41
  "react-dom": "19.2.3",
42
- "@remotion/eslint-config-internal": "4.0.522",
42
+ "@remotion/eslint-config-internal": "4.0.524",
43
43
  "eslint": "9.19.0",
44
44
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
45
45
  },