@remotion/skia 3.3.94 → 3.3.95
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/cjs/enable.js +19 -6
- package/dist/esm/enable.mjs +19 -6
- package/package.json +6 -8
package/dist/cjs/enable.js
CHANGED
|
@@ -4,7 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.enableSkia = void 0;
|
|
7
|
-
const
|
|
7
|
+
const bundler_1 = require("@remotion/bundler");
|
|
8
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
9
|
/**
|
|
9
10
|
* @description A function that modifies the default Webpack configuration to make the necessary changes to support Skia.
|
|
10
11
|
* @see [Documentation](https://www.remotion.dev/docs/skia/enable-skia)
|
|
@@ -15,11 +16,23 @@ const enableSkia = (currentConfiguration) => {
|
|
|
15
16
|
...currentConfiguration,
|
|
16
17
|
plugins: [
|
|
17
18
|
...((_a = currentConfiguration.plugins) !== null && _a !== void 0 ? _a : []),
|
|
18
|
-
new
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
new (class CopySkiaPlugin {
|
|
20
|
+
apply(compiler) {
|
|
21
|
+
compiler.hooks.thisCompilation.tap('AddSkiaPlugin', (compilation) => {
|
|
22
|
+
compilation.hooks.processAssets.tapPromise({
|
|
23
|
+
name: 'copy-skia',
|
|
24
|
+
stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL,
|
|
25
|
+
}, async () => {
|
|
26
|
+
const src = require.resolve('canvaskit-wasm/bin/full/canvaskit.wasm');
|
|
27
|
+
if (compilation.getAsset(src)) {
|
|
28
|
+
// Skip emitting the asset again because it's immutable
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
compilation.emitAsset('/canvaskit.wasm', new bundler_1.webpack.sources.RawSource(await fs_1.default.promises.readFile(src)));
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
})(),
|
|
23
36
|
],
|
|
24
37
|
resolve: {
|
|
25
38
|
...currentConfiguration.resolve,
|
package/dist/esm/enable.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { webpack } from '@remotion/bundler';
|
|
2
|
+
import fs from 'fs';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @description A function that modifies the default Webpack configuration to make the necessary changes to support Skia.
|
|
@@ -10,11 +11,23 @@ const enableSkia = (currentConfiguration) => {
|
|
|
10
11
|
...currentConfiguration,
|
|
11
12
|
plugins: [
|
|
12
13
|
...((_a = currentConfiguration.plugins) !== null && _a !== void 0 ? _a : []),
|
|
13
|
-
new
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
new (class CopySkiaPlugin {
|
|
15
|
+
apply(compiler) {
|
|
16
|
+
compiler.hooks.thisCompilation.tap('AddSkiaPlugin', (compilation) => {
|
|
17
|
+
compilation.hooks.processAssets.tapPromise({
|
|
18
|
+
name: 'copy-skia',
|
|
19
|
+
stage: compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL,
|
|
20
|
+
}, async () => {
|
|
21
|
+
const src = require.resolve('canvaskit-wasm/bin/full/canvaskit.wasm');
|
|
22
|
+
if (compilation.getAsset(src)) {
|
|
23
|
+
// Skip emitting the asset again because it's immutable
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
compilation.emitAsset('/canvaskit.wasm', new webpack.sources.RawSource(await fs.promises.readFile(src)));
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
})(),
|
|
18
31
|
],
|
|
19
32
|
resolve: {
|
|
20
33
|
...currentConfiguration.resolve,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/skia",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.95",
|
|
4
4
|
"description": "Utilities for using react-native-skia in Remotion",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -16,20 +16,18 @@
|
|
|
16
16
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"
|
|
20
|
-
"remotion": "3.3.94"
|
|
19
|
+
"remotion": "3.3.95"
|
|
21
20
|
},
|
|
22
21
|
"peerDependencies": {
|
|
23
|
-
"@
|
|
24
|
-
"@shopify/react-native-skia": "^0.1.190",
|
|
22
|
+
"@shopify/react-native-skia": "^0.1.191",
|
|
25
23
|
"react": ">=16.8.0",
|
|
26
24
|
"react-dom": ">=16.8.0"
|
|
27
25
|
},
|
|
28
26
|
"devDependencies": {
|
|
29
27
|
"@jonny/eslint-config": "3.0.266",
|
|
30
|
-
"@remotion/bundler": "3.3.
|
|
28
|
+
"@remotion/bundler": "3.3.95",
|
|
31
29
|
"@rollup/plugin-typescript": "^8.2.0",
|
|
32
|
-
"@shopify/react-native-skia": "^0.1.
|
|
30
|
+
"@shopify/react-native-skia": "^0.1.191",
|
|
33
31
|
"@types/react": "18.0.26",
|
|
34
32
|
"@types/react-native": "^0.69.2",
|
|
35
33
|
"eslint": "8.25.0",
|
|
@@ -37,7 +35,7 @@
|
|
|
37
35
|
"prettier-plugin-organize-imports": "^2.3.4",
|
|
38
36
|
"react": "18.0.0",
|
|
39
37
|
"react-dom": "18.0.0",
|
|
40
|
-
"remotion": "3.3.
|
|
38
|
+
"remotion": "3.3.95",
|
|
41
39
|
"rollup": "^2.70.1",
|
|
42
40
|
"typescript": "^4.7.0"
|
|
43
41
|
},
|