I’m doing some prototyping for a new project, and am hoping to use the latest and greatest in JS tooling: NPM, React, ES6, and Webpack. Since Cesium was just officially released as an NPM package, I installed that, and tried importing Cesium. Unfortunately, things aren’t looking good at the moment. If I run things as-is, Node blows up with a “process out of memory” error. If I add “–max_old_space_size=4096” as an argument to webpack-dev-server, it chugs along for a while and sucks up a couple gigs, then throws up complaints about all the JSON, JPG, and XML files under Cesium/Source/Assets, saying I need to have loaders configured for those file types. If I try adding direct alias references to the pre-compiled Cesium.js scripts under node_modules/cesium/Build and labeling them as “noParse”, it gives errors regarding Knockout’s use of require() in the bundled versions (per the Webpack docs, scripts added to “noParse” are not allowed to use require().
So… is anyone else out there actually using Cesum with Webpack yet, and if so, any tips or suggestions for how to set things up nicely?