@remotion/bundler 4.0.182 → 4.0.183

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.
@@ -0,0 +1,5 @@
1
+ import type { Compiler } from 'webpack';
2
+ export declare class AllowDependencyExpressionPlugin {
3
+ filter(error: Error): boolean;
4
+ apply(compiler: Compiler): void;
5
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ // When Webpack cannot resolve these dependencies, it will not print an error message.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AllowDependencyExpressionPlugin = void 0;
5
+ // If importing TypeScript, it will give this warning:
6
+ // WARNING in ./node_modules/typescript/lib/typescript.js 6304:33-52
7
+ // Critical dependency: the request of a dependency is an expression
8
+ class AllowDependencyExpressionPlugin {
9
+ filter(error) {
10
+ if (error.message.includes('the request of a dependency is an expression')) {
11
+ return false;
12
+ }
13
+ return true;
14
+ }
15
+ apply(compiler) {
16
+ compiler.hooks.afterCompile.tap('Com', (compilation) => {
17
+ compilation.errors = compilation.errors.filter(this.filter);
18
+ });
19
+ compiler.hooks.afterEmit.tap('AllowOptionalDependenciesPlugin', (compilation) => {
20
+ compilation.errors = compilation.errors.filter(this.filter);
21
+ compilation.warnings = compilation.warnings.filter(this.filter);
22
+ });
23
+ }
24
+ }
25
+ exports.AllowDependencyExpressionPlugin = AllowDependencyExpressionPlugin;
@@ -36,6 +36,7 @@ const webpack_cache_1 = require("./webpack-cache");
36
36
  const esbuild = require("esbuild");
37
37
  const no_react_1 = require("remotion/no-react");
38
38
  const case_sensitive_paths_1 = require("./case-sensitive-paths");
39
+ const hide_expression_dependency_1 = require("./hide-expression-dependency");
39
40
  const optional_dependencies_1 = require("./optional-dependencies");
40
41
  if (!(react_dom_1.default === null || react_dom_1.default === void 0 ? void 0 : react_dom_1.default.version)) {
41
42
  throw new Error('Could not find "react-dom" package. Did you install it?');
@@ -103,6 +104,7 @@ const webpackConfig = async ({ entry, userDefinedComponent, outDir, environment,
103
104
  new webpack_1.default.HotModuleReplacementPlugin(),
104
105
  define,
105
106
  new optional_dependencies_1.AllowOptionalDependenciesPlugin(),
107
+ new hide_expression_dependency_1.AllowDependencyExpressionPlugin(),
106
108
  ]
107
109
  : [
108
110
  new webpack_1.ProgressPlugin((p) => {
@@ -115,6 +117,7 @@ const webpackConfig = async ({ entry, userDefinedComponent, outDir, environment,
115
117
  }),
116
118
  define,
117
119
  new optional_dependencies_1.AllowOptionalDependenciesPlugin(),
120
+ new hide_expression_dependency_1.AllowDependencyExpressionPlugin(),
118
121
  ],
119
122
  output: {
120
123
  hashFunction: 'xxhash64',
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.182",
6
+ "version": "4.0.183",
7
7
  "description": "Bundle Remotion compositions using Webpack",
8
8
  "main": "dist/index.js",
9
9
  "sideEffects": false,
@@ -25,9 +25,9 @@
25
25
  "style-loader": "2.0.0",
26
26
  "source-map": "0.7.3",
27
27
  "webpack": "5.83.1",
28
- "remotion": "4.0.182",
29
- "@remotion/studio": "4.0.182",
30
- "@remotion/studio-shared": "4.0.182"
28
+ "remotion": "4.0.183",
29
+ "@remotion/studio": "4.0.183",
30
+ "@remotion/studio-shared": "4.0.183"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": ">=16.8.0",