with version 9.8.0 importing and using the there is :
Error: Error during dependency optimization:
X [ERROR] Could not resolve “@babylonjs /core::BABYLON.Debug”
node_modules/@babylonjs /node-particle-editor/dist/babylon.nodeParticleEditor.js:1:145:
1 │ …rials"),require(“@babylonjs /core::BABYLON.Debug”)):“function”==t…
cause:
!function(e,t){“object”==typeof exports&&“undefined”!=typeof module?t(exports,require(“@babylonjs /core”),require(“@babylonjs /materials”),require(“@babylonjs /core::BABYLON.Debug”))
working:
!function(e,t){“object”==typeof exports&&“undefined”!=typeof module?t(exports,require(“@babylonjs /core”),require(“@babylonjs /materials”),require(“@babylonjs /core”))
i hope this helps
thanks, I will try to reproduce and fix it. Is this new to 9.8.0, or was it already an issue in 9.7.0?
issue found and will be resolved very soon. I will release a new version with a fix once it’s merged.
master ← RaananW:fix-node-particle-editor-packaging
opened 01:34PM - 19 May 26 UTC
## Summary
This PR fixes several packaging and validation issues found while in… vestigating `@babylonjs/node-particle-editor` consumption from a webpack 5 TypeScript app.
## What changed
- Fixed ES6 package externalization for Babylon sub-namespace imports in `packages/public/rollupUMDHelper.mjs`.
- ES6 builds now map Debug imports to real package subpaths such as `@babylonjs/core/Debug/index.js`.
- Loader sub-namespace imports map to real `@babylonjs/loaders` subpaths where applicable.
- This avoids generated module requests like `@babylonjs/core::BABYLON.Debug`, which only make sense as synthetic UMD-global IDs.
- Fixed `@babylonjs/node-particle-editor` runtime exports.
- The public package wrapper now re-exports the legacy entry exports so runtime named exports match the TypeScript declarations, including `NodeParticleEditor`.
- Removed the leaked FontAwesome package metadata request from bundled output.
- The bundle helper now rewrites `require("@fortawesome/fontawesome-svg-core/package.json")` to an inline version object based on the installed package version.
- This keeps the FontAwesome runtime behavior without requiring consumers to install or resolve `@fortawesome/fontawesome-svg-core/package.json` separately.
- Added regression coverage for the ES6 editor package output.
- The ES6 smoke build now verifies the node particle editor runtime entry does not contain forbidden requests for `@babylonjs/core::BABYLON.Debug` or `@fortawesome/fontawesome-svg-core/package.json`.
- It also checks that the named `NodeParticleEditor` export is present.
- A webpack 5 smoke build now imports `NodeParticleEditor` from `@babylonjs/node-particle-editor` without consumer aliases and checks that the resulting bundle and warnings do not contain the forbidden requests.
- Reduced noisy Rollup warnings from third-party module directives.
- Shared Rollup warning handling now suppresses third-party `"use client"` / `"use server"` module-level directive warnings from `node_modules`, while preserving other warnings.
- Broke the mesh simplification circular dependency.
- Shared simplification settings and enum definitions moved into a side-effect-free `meshSimplification.common.ts` module.
- `meshSimplification.ts`, `meshSimplificationSceneComponent.pure.ts`, and the matching types file now import from that common module where appropriate.
- The side-effects manifest was regenerated for the new file.
- Made circular dependency detection fail CI linting.
- `lint:cycles` now uses the same `dpdm` check as CI, with `--exit-code circular:1`.
- `lint:check-ci` now runs `lint:cycles`, so circular dependencies fail the lint step instead of only printing diagnostics.
- The duplicate direct pipeline step was removed, and the tree-shaking README was updated to describe the new wiring.
## Validation
Ran the following checks during the session:
- `npm run build:es6`
- `npm run build:prod -w @babylonjs/node-editor`
- `NX_SKIP_NX_CACHE=true npm run build:es6:tools`
- focused node particle editor webpack smoke validation (`webpack smoke passed`)
- direct package artifact checks confirming:
- no `@babylonjs/core::BABYLON.Debug` request
- no `@fortawesome/fontawesome-svg-core/package.json` request
- named `NodeParticleEditor` export present
- direct import-graph check for the mesh simplification scene component cycle
- focused ESLint on the touched core files
- `npm run check:treeshaking`
- `npm run check:side-effects-sync`
- `npm run compile:source -w @dev/core`
- `npm run lint:cycles`
- `npm run lint:check-ci`
The final `lint:check-ci` run passed with the updated `dpdm` cycle check in the lint chain.