drone_view 3.0.57 → 3.0.58

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": "drone_view",
3
- "version": "3.0.57",
3
+ "version": "3.0.58",
4
4
  "main": "dist/droneView.js",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -4,10 +4,7 @@ const path = require("path");
4
4
  const webpack = require("webpack");
5
5
  const CopyWebpackPlugin = require("copy-webpack-plugin");
6
6
 
7
- const cesiumRoot = "node_modules/cesium";
8
- const cesiumUnmin = "node_modules/cesium/Build/CesiumUnminified";
9
- // ESM source folder (explicit)
10
- const cesiumSource = path.resolve(__dirname, "node_modules/cesium/Source");
7
+ const cesiumUnmin = path.resolve(__dirname, "node_modules/cesium/Build/CesiumUnminified");
11
8
 
12
9
  module.exports = {
13
10
  entry: {
@@ -27,16 +24,20 @@ module.exports = {
27
24
  output: {
28
25
  filename: "droneView.js",
29
26
  path: path.resolve(__dirname, "dist"),
30
- library: "DroneView",
31
- libraryTarget: "umd",
32
- // adjust publicPath if your pipeline needs it; runtime Cesium assets use CESIUM_BASE_URL
27
+ // Export as an ES module for dynamic import
28
+ library: {
29
+ type: "module",
30
+ },
33
31
  publicPath: "",
34
32
  sourcePrefix: "",
35
33
  clean: true,
36
- // globalObject recommended for universal builds
37
34
  globalObject: "this",
38
35
  },
39
36
 
37
+ experiments: {
38
+ outputModule: true, // required for ES module output
39
+ },
40
+
40
41
  resolve: {
41
42
  extensions: [".ts", ".tsx", ".js"],
42
43
  fallback: {
@@ -48,8 +49,8 @@ module.exports = {
48
49
  },
49
50
 
50
51
  alias: {
51
- // point to the Source/ESM folder (explicit)
52
- cesium: path.resolve(__dirname, "node_modules/cesium/Build/CesiumUnminified"),
52
+ // Point to Build/CesiumUnminified for Cesium 1.135+
53
+ cesium: cesiumUnmin,
53
54
  },
54
55
  },
55
56
 
@@ -72,7 +73,7 @@ module.exports = {
72
73
  },
73
74
 
74
75
  {
75
- // Required for Cesium ES modules to load correctly from node_modules/cesium
76
+ // Required for Cesium ES modules to load correctly
76
77
  test: /\.js$/,
77
78
  include: /node_modules[\\/]cesium/,
78
79
  type: "javascript/esm",
@@ -84,12 +85,11 @@ module.exports = {
84
85
  // Copy Cesium static assets (Workers, Widgets, Assets, ThirdParty)
85
86
  new CopyWebpackPlugin({
86
87
  patterns: [
87
- { from: path.join(__dirname, `${cesiumUnmin}/Workers`), to: path.resolve(__dirname, "service/3d/Workers") },
88
- { from: path.join(__dirname, `${cesiumUnmin}/ThirdParty`), to: path.resolve(__dirname, "service/3d/ThirdParty") },
89
- { from: path.join(__dirname, `${cesiumUnmin}/Assets`), to: path.resolve(__dirname, "service/3d/Assets") },
90
- { from: path.join(__dirname, `${cesiumUnmin}/Widgets`), to: path.resolve(__dirname, "service/3d/Widgets") },
91
- // optional: copy Cesium.js if you want the unminified UMD available
92
- { from: path.join(__dirname, `${cesiumUnmin}/Cesium.js`), to: path.resolve(__dirname, "service/3d/Cesium.js") },
88
+ { from: path.join(cesiumUnmin, "Workers"), to: path.resolve(__dirname, "service/3d/Workers") },
89
+ { from: path.join(cesiumUnmin, "ThirdParty"), to: path.resolve(__dirname, "service/3d/ThirdParty") },
90
+ { from: path.join(cesiumUnmin, "Assets"), to: path.resolve(__dirname, "service/3d/Assets") },
91
+ { from: path.join(cesiumUnmin, "Widgets"), to: path.resolve(__dirname, "service/3d/Widgets") },
92
+ { from: path.join(cesiumUnmin, "Cesium.js"), to: path.resolve(__dirname, "service/3d/Cesium.js") },
93
93
  ],
94
94
  }),
95
95
 
@@ -98,7 +98,6 @@ module.exports = {
98
98
  }),
99
99
 
100
100
  new webpack.DefinePlugin({
101
- // runtime path for Cesium static assets (workers, etc)
102
101
  CESIUM_BASE_URL: JSON.stringify("/service/3d/"),
103
102
  }),
104
103
  ],