CesiumGS / cesium-webpack-example

The minimal recommended setup for an application using Cesium with Webpack.
Apache License 2.0
248 stars 160 forks source link

Updates for using webpack 5. Please review #25

Closed petrushy closed 10 months ago

petrushy commented 3 years ago

A PR for building using webpack 5. It is working but please review, I am by no means an expert in this area.

Especially regarding the import of .css in the src/index.js I think is likely not the right way to do it, but cannot find another way without a protest regarding the exports in cesium:

import "../dist/Widgets/widgets.css"
goldenram commented 3 years ago

Any progress made on this? We are trying to update our project to use Webpack 5 and the Cesium library is the only library blocking completing that task. Thanks!

petrushy commented 3 years ago

Hi, It works it seems and I also realized there is another PR with webpack 5 https://github.com/CesiumGS/cesium-webpack-example/pull/23

But would be good if someone with more insight reviewed this / that.

boeckMt commented 3 years ago

Hey I think there are now three PR's with similar stuff. Maybe someone can link/merge #28. #23, #25 together?

maylortaylor commented 1 year ago

I am getting a ReferenceError: __dirname is not defined in the index.cjs file at the point below: module.exports = webpack_require__("../../node_modules/cesium sync recursive")(path.join( dirname, "Build/CesiumUnminified/index.cjs" ));

jjspace commented 10 months ago

replaced by https://github.com/CesiumGS/cesium-webpack-example/pull/52