babel-plugin-reactylon 1.3.2 → 1.3.3
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/build/ParserUtils.js
CHANGED
|
@@ -75,11 +75,18 @@ class ParserUtils {
|
|
|
75
75
|
const rel = path.relative(pkgRoot, fullPath).replace(/\.(js|mjs|ts)$/, '');
|
|
76
76
|
const importPath = path.posix.join(pkgName, rel.split(path.sep).join('/'));
|
|
77
77
|
const { exports, sideEffects } = this.getExportsAndSideEffects(fullPath);
|
|
78
|
+
// After PR #18441 (https://github.com/BabylonJS/Babylon.js/pull/18441), exports and
|
|
79
|
+
// side effects live in .pure files. For both, we map to the wrapper (same name without
|
|
80
|
+
// .pure): the wrapper does `export * from ".pure"` so the export is still accessible,
|
|
81
|
+
// and it calls Register*() so side effects are properly executed. Before the PR no
|
|
82
|
+
// .pure files existed, so this branch is never taken and behaviour is unchanged.
|
|
83
|
+
const resolvedPath = importPath.endsWith('.pure') ? importPath.slice(0, -5) : importPath;
|
|
78
84
|
exports.forEach(exp => {
|
|
79
|
-
exportsMap[exp] =
|
|
85
|
+
exportsMap[exp] = resolvedPath;
|
|
80
86
|
});
|
|
87
|
+
const sideEffectPath = resolvedPath;
|
|
81
88
|
sideEffects.forEach(sideEffect => {
|
|
82
|
-
sideEffectsMap[sideEffect] =
|
|
89
|
+
sideEffectsMap[sideEffect] = sideEffectPath;
|
|
83
90
|
});
|
|
84
91
|
}
|
|
85
92
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-plugin-reactylon",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "Babel plugin to enable tree-shaking of Babylon.js classes within a Reactylon application.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@babel/core": "^7.26.10",
|
|
17
|
-
"@babylonjs/core": "^9",
|
|
18
|
-
"@babylonjs/gui": "^9",
|
|
17
|
+
"@babylonjs/core": "^9.8.0",
|
|
18
|
+
"@babylonjs/gui": "^9.8.0",
|
|
19
19
|
"@types/babel__helper-plugin-utils": "^7.10.3",
|
|
20
20
|
"@types/jest": "^29.5.14",
|
|
21
21
|
"@types/node": "^20.1.7",
|