Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ module.exports = [{
new webpack.DefinePlugin({
// Define relative base path in cesium for loading assets
CESIUM_BASE_URL: JSON.stringify('')
}),
new webpack.ContextReplacementPlugin(/cesium\/Source\/Core/, ctx => {
// Suppress warnings "require function is used in a way in which dependencies cannot be statically extracted"
// in cesium/Source/Core/buildModuleUrl.js
const { resource, context, dependencies } = ctx;
if (resource === context) {
dependencies.forEach(dependency => dependency.critical = false);
}
return ctx;
})
],

Expand Down
9 changes: 9 additions & 0 deletions webpack.release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ module.exports = [{
new webpack.DefinePlugin({
// Define relative base path in cesium for loading assets
CESIUM_BASE_URL: JSON.stringify('')
}),
new webpack.ContextReplacementPlugin(/cesium\/Source\/Core/, ctx => {
// Suppress warnings "require function is used in a way in which dependencies cannot be statically extracted"
// in cesium/Source/Core/buildModuleUrl.js
const { resource, context, dependencies } = ctx;
if (resource === context) {
dependencies.forEach(dependency => dependency.critical = false);
}
return ctx;
})
]
}];