@cpp.js/plugin-webpack 2.0.0-beta.21 → 2.0.0-beta.23
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/index.js +2 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import {
|
|
4
|
-
state, createLib, buildWasm, createBridgeFile, getData, getCppJsScript, getTargetParams, getFilteredBuildTargets, isSourceNewer,
|
|
4
|
+
state, createLib, buildWasm, createBridgeFile, getData, getCppJsScript, buildDependencies, getTargetParams, getFilteredBuildTargets, isSourceNewer,
|
|
5
5
|
} from 'cpp.js';
|
|
6
6
|
|
|
7
7
|
const targetParams = getTargetParams({ platform: ['wasm'], arch: ['wasm32'], runtime: ['st'], runtimeEnv: ['browser'] }, true);
|
|
@@ -40,6 +40,7 @@ export default class CppjsWebpackPlugin {
|
|
|
40
40
|
async onDone({ compilation }) {
|
|
41
41
|
const isDev = compilation.options.mode === 'development';
|
|
42
42
|
const buildTarget = isDev ? buildTargetDebug : buildTargetRelease;
|
|
43
|
+
await buildDependencies({ targetParams: { ...targetParams, buildType: [buildTarget.buildType] } });
|
|
43
44
|
const force = isSourceNewer(buildTarget);
|
|
44
45
|
createLib(buildTarget, 'Source', { force, buildSource: true });
|
|
45
46
|
createLib(buildTarget, 'Bridge', { force, buildSource: false, nativeGlob: [`${state.config.paths.cli}/assets/cpp-runtime/commonBridges.cpp`, ...this.bridges] });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cpp.js/plugin-webpack",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.23",
|
|
4
4
|
"description": "Cpp.js Webpack plugin: A tool for seamless C++ integration with the Webpack bundler.",
|
|
5
5
|
"homepage": "https://github.com/bugra9/cpp.js/tree/main/packages/cppjs-plugin-rollup#readme",
|
|
6
6
|
"repository": "https://github.com/bugra9/cpp.js.git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "index.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"cpp.js": "^2.0.0-beta.
|
|
11
|
+
"cpp.js": "^2.0.0-beta.23"
|
|
12
12
|
},
|
|
13
13
|
"keywords": [
|
|
14
14
|
"cpp.js-plugin",
|