Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix remaining issues that require special Webpack configuration settings? #4876
Per https://cesiumjs.org/2016/01/26/Cesium-and-Webpack/ , Cesium requires two specific Webpack configuration options to be set:
Unfortunately, this means that Cesium doesn't work out of the box with a project created using the Create-React-App tool, which hides the Webpack config options unless you run a one-time
It would be nice if things could be cleaned up enough that Cesium could work with Webpack, with no addtiional config options needed. (The "copy Cesium files to /public" step is still a bit annoying, but acceptable.)
I imagine the multi-line strings would be fixable by either using ES6 template strings, or choosing alternate methods of string construction. I'm not sure how many there are in the Cesium codebase, or how much effort it would be to rework them.
Also not sure how difficult it would be to get the dynamic module warnings cleaned up, on either the Cesium side or Webpack side.
Ultimately we want to make Cesium work out of the box with all of the most popular build solutions, which is why we'll most likely move to ES6 modules sometime this year. I expect there may be some Webpack specific issues, but the goal would be to have Cesium work out of the box on it and all other popular solutions. Once we're transpiling out of necessity, I expect template strings may be the best solution for the multiline problem and if everything is ES6, hopefully the
So we'll definitely address this, but it will happen as part of the larger module effort.
referenced this issue
Jun 13, 2017
This should all be addressed by our recommended webpack configuration and example repository.