babel-plugin-reactylon 1.0.7 → 1.1.0
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/README.md +1 -3
- package/build/index.js +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ export default defineConfig({
|
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
### Additional configurations
|
|
86
|
-
Additionally you can manually define extra side effects (see [Babylon.js ES6 support FAQ](https://doc.babylonjs.com/setup/frameworkPackages/es6Support/#faq))
|
|
86
|
+
Additionally you can manually define extra side effects (see [Babylon.js ES6 support FAQ](https://doc.babylonjs.com/setup/frameworkPackages/es6Support/#faq)).
|
|
87
87
|
|
|
88
88
|
```js
|
|
89
89
|
['babel-plugin-reactylon', {
|
|
@@ -91,8 +91,6 @@ Additionally you can manually define extra side effects (see [Babylon.js ES6 sup
|
|
|
91
91
|
sideEffects: [
|
|
92
92
|
'@babylonjs/core/Engines/Extensions/engine.query.js'
|
|
93
93
|
]
|
|
94
|
-
// node modules path (optional)
|
|
95
|
-
nodeModulesPath: '../../node_modules'
|
|
96
94
|
}]
|
|
97
95
|
```
|
|
98
96
|
|
package/build/index.js
CHANGED
|
@@ -166,8 +166,10 @@ export default declare((api) => {
|
|
|
166
166
|
if (t.isMemberExpression(callee)) {
|
|
167
167
|
const property = callee.property;
|
|
168
168
|
if (t.isIdentifier(property)) {
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
const sideEffectPath = coreSideEffectsMap[property.name];
|
|
170
|
+
// exclude assets folder where there are .wasm and relative .js files
|
|
171
|
+
if (sideEffectPath && !sideEffectPath.startsWith('@babylonjs/core/assets/')) {
|
|
172
|
+
sideEffects.push(t.importDeclaration([], t.stringLiteral(sideEffectPath)));
|
|
171
173
|
// callPath.stop();
|
|
172
174
|
}
|
|
173
175
|
}
|
package/package.json
CHANGED