@remotion/bundler 4.0.523 → 4.0.525

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)
@@ -2,6 +2,7 @@
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',
@@ -17,23 +18,24 @@ class AllowOptionalDependenciesPlugin {
17
18
  filter(error) {
18
19
  var _a, _b, _c, _d, _e;
19
20
  var _f;
21
+ const message = (0, studio_shared_1.stripAnsi)(error.message);
20
22
  for (const dependency of OPTIONAL_DEPENDENCIES) {
21
- if (error.message.includes(`Can't resolve '${dependency}'`)) {
23
+ if (message.includes(`Can't resolve '${dependency}'`)) {
22
24
  return false;
23
25
  }
24
26
  }
25
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 : '';
26
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;
27
29
  for (const dependency of STUDIO_OPTIONAL_DEPENDENCIES) {
28
- if (error.message.includes(`Can't resolve '${dependency}'`) &&
30
+ if (message.includes(`Can't resolve '${dependency}'`) &&
29
31
  (issuerPackageName === '@remotion/studio' ||
30
32
  issuer.includes('/@remotion/studio/'))) {
31
33
  return false;
32
34
  }
33
35
  }
34
36
  for (const dependency of SOURCE_MAP_IGNORE) {
35
- if (error.message.includes(`Can't resolve '${dependency}'`) &&
36
- error.message.includes('source-map')) {
37
+ if (message.includes(`Can't resolve '${dependency}'`) &&
38
+ message.includes('source-map')) {
37
39
  return false;
38
40
  }
39
41
  }
@@ -1,22 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getReactScanEntryPoint = void 0;
4
- const endpointEnvName = 'REMOTION_REACT_SCAN_ENDPOINT';
5
4
  const entryPointEnvName = 'REMOTION_REACT_SCAN_ENTRY_POINT';
6
- const sessionIdEnvName = 'REMOTION_REACT_SCAN_SESSION_ID';
7
5
  const getReactScanEntryPoint = (environment) => {
8
6
  if (environment === 'production') {
9
7
  return null;
10
8
  }
11
- const endpoint = process.env[endpointEnvName];
12
9
  const entryPoint = process.env[entryPointEnvName];
13
- const sessionId = process.env[sessionIdEnvName];
14
- if (!endpoint && !entryPoint && !sessionId) {
15
- return null;
16
- }
17
- if (!endpoint || !entryPoint || !sessionId) {
18
- throw new Error(`${endpointEnvName}, ${entryPointEnvName}, and ${sessionIdEnvName} must be set together`);
19
- }
20
- return entryPoint;
10
+ return entryPoint !== null && entryPoint !== void 0 ? entryPoint : null;
21
11
  };
22
12
  exports.getReactScanEntryPoint = getReactScanEntryPoint;
@@ -47,6 +47,12 @@ const rspackConfig = async ({ entry, userDefinedComponent, outDir, environment,
47
47
  const sharedBaseConfig = (0, shared_bundler_config_1.getBaseConfig)(environment, poll);
48
48
  const baseConfig = {
49
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
+ },
50
56
  experiments: {
51
57
  ...sharedBaseConfig.experiments,
52
58
  ...(environment === 'development'
@@ -12,6 +12,7 @@ export declare class WatchIgnoreNextChangePlugin {
12
12
  ignoreNextChange(file: string): void;
13
13
  unignoreNextChange(file: string): void;
14
14
  consumeSuppressedFilesHistory(): string[];
15
+ consumeSuppressedFilesForRebuild(): string[];
15
16
  apply(compiler: Compiler): void;
16
17
  }
17
18
  export {};
@@ -67,6 +67,17 @@ class WatchIgnoreNextChangePlugin {
67
67
  this.suppressedFilesHistory.clear();
68
68
  return files;
69
69
  }
70
+ consumeSuppressedFilesForRebuild() {
71
+ // Include writes whose watcher event has not arrived yet.
72
+ const files = [
73
+ ...new Set([...this.suppressedFilesHistory, ...this.filesToIgnore]),
74
+ ];
75
+ this.suppressedFilesHistory.clear();
76
+ for (const file of files) {
77
+ this.unignoreNextChange(file);
78
+ }
79
+ return files;
80
+ }
70
81
  apply(compiler) {
71
82
  compiler.hooks.afterEnvironment.tap('WatchIgnoreNextChangePlugin', () => {
72
83
  const wfs = compiler.watchFileSystem;
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.523",
6
+ "version": "4.0.525",
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.523",
28
- "@remotion/studio": "4.0.523",
29
- "@remotion/studio-shared": "4.0.523",
30
- "@remotion/timeline-utils": "4.0.523",
31
- "@remotion/media-parser": "4.0.523",
27
+ "remotion": "4.0.525",
28
+ "@remotion/studio": "4.0.525",
29
+ "@remotion/studio-shared": "4.0.525",
30
+ "@remotion/timeline-utils": "4.0.525",
31
+ "@remotion/media-parser": "4.0.525",
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.523",
42
+ "@remotion/eslint-config-internal": "4.0.525",
43
43
  "eslint": "9.19.0",
44
44
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
45
45
  },