babylonjs-gui 9.4.0 → 9.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-gui",
3
- "version": "9.4.0",
3
+ "version": "9.5.0",
4
4
  "main": "babylon.gui.min.js",
5
5
  "types": "babylon.gui.module.d.ts",
6
6
  "files": [
@@ -8,23 +8,18 @@
8
8
  ],
9
9
  "scripts": {
10
10
  "build": "npm run clean & npm run build:prod && npm run build:declaration",
11
- "build:dev": "webpack --env development",
12
- "build:prod": "webpack --env production",
11
+ "build:dev": "rollup -c rollup.config.umd.mjs",
12
+ "build:prod": "rollup -c rollup.config.umd.mjs --environment ROLLUP_MODE:production",
13
13
  "build:declaration": "build-tools -c pud --config ./config.json",
14
14
  "clean": "rimraf dist && rimraf babylon*.* -g",
15
15
  "test:escheck": "es-check es6 ./babylon.gui.js"
16
16
  },
17
17
  "dependencies": {
18
- "babylonjs": "9.4.0"
18
+ "babylonjs": "9.5.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@dev/build-tools": "1.0.0",
22
- "@dev/gui": "1.0.0",
23
- "source-map-loader": "^4.0.0",
24
- "ts-loader": "^9.2.6",
25
- "webpack": "^5.103.0",
26
- "webpack-cli": "6.0.1",
27
- "webpack-merge": "^5.8.0"
22
+ "@dev/gui": "1.0.0"
28
23
  },
29
24
  "keywords": [
30
25
  "3D",
@@ -0,0 +1,15 @@
1
+ import { commonUMDRollupConfiguration } from "../../rollupUMDHelper.mjs";
2
+ import path from "path";
3
+
4
+ const mode = process.env.ROLLUP_MODE === "production" ? "production" : "development";
5
+
6
+ export default commonUMDRollupConfiguration({
7
+ mode,
8
+ devPackageName: "gui",
9
+ namespace: "BABYLON.GUI",
10
+ outputPath: path.resolve("."),
11
+ minToMax: true,
12
+ alias: {
13
+ gui: path.resolve("../../../dev/gui/src"),
14
+ },
15
+ });
package/src/index.ts CHANGED
@@ -1,4 +1,8 @@
1
- import * as gui from "gui/legacy/legacy";
2
-
3
- export { gui };
4
- export default gui;
1
+ // Export all named symbols directly so BABYLON.GUI.AdvancedDynamicTexture etc. work.
2
+ // With Rollup UMD (unlike webpack's libraryExport:"default"), named exports must be
3
+ // explicitly re-exported for them to appear on the global namespace object.
4
+ //
5
+ // IMPORTANT: Do NOT also `import * as gui; export { gui }` here.
6
+ // When both patterns coexist, terser collapses all individual exports into the
7
+ // namespace object in the minified bundle, leaving BABYLON.GUI.X undefined at runtime.
8
+ export * from "gui/legacy/legacy";