Hi Nick,
I haven't used Webpack, but I have used browserify, which works similarly.
Cesium is a bit tricky to use in this sort of environment, because:
- It uses Web Workers to do work in background threads, to improve performance.
- It has a number of static assets that are needed at runtime, other than JavaScript and CSS, such as the star texture, Viewer UI images, and data used to transform between the Earth fixed and inertial frames.
To use it:
1. npm install --save terriajs-cesium
2. require-in individual Cesium types from the Source/[Core/Renderer/Scene/Widgets/etc] directories, e.g.:
var Viewer = require('terriajs-cesium/Source/Widgets/Viewer/Viewer');
3. Make sure the contents of node_modules/terriajs-cesium/wwwroot/build is somewhere on your web server at runtime, and tell buildModuleUrl where it is, e.g.:
buildModuleUrl.setBaseUrl('./Cesium/build/');
You may still get some warnings from WebPack at build time (I don't see any from Browserify). I _think_ they'll be harmless.
Kevin