Skip to content

Commit

Permalink
Fix geosolutions-it#10709 Allow to set the CESIUM_BASE_URL dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
allyoucanmap committed Dec 3, 2024
1 parent 831eab5 commit 82fd3d4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions build/buildConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,13 @@ module.exports = (...args) => mapArgumentsToObject(args, ({
}),
new DefinePlugin({ '__MAPSTORE_PROJECT_CONFIG__': JSON.stringify(projectConfig) }),
VERSION_INFO_DEFINE_PLUGIN,
new DefinePlugin({
// Define relative base path in cesium for loading assets
'CESIUM_BASE_URL': JSON.stringify(cesiumBaseUrl ? cesiumBaseUrl : path.join('dist', 'cesium'))
}),
...(cesiumBaseUrl !== false
? [
new DefinePlugin({
// Define relative base path in cesium for loading assets
'CESIUM_BASE_URL': JSON.stringify(cesiumBaseUrl ? cesiumBaseUrl : path.join('dist', 'cesium'))
})
] : []),
new CopyWebpackPlugin([
{ from: path.join(getCesiumPath({ paths, prod }), 'Workers'), to: path.join(paths.dist, 'cesium', 'Workers') },
{ from: path.join(getCesiumPath({ paths, prod }), 'Assets'), to: path.join(paths.dist, 'cesium', 'Assets') },
Expand Down

0 comments on commit 82fd3d4

Please sign in to comment.