I spent a little time trying to get this to work, and (SPOILER) didn't solve it, but thought I'd post what I tried here in case anyone has ideas, or just wants to avoid making the same mistakes.
In both cases, I changed the gltf-pipeline index.js entrypoint to a minimal subset that still included Cesium:
// index.js
var addDefaults = require('./lib/addDefaults');
var output = addDefaults({});
console.log(output);
And, created an entry point to Cesium that didn't wrap with RequireJS:
if (!FeatureDetection.supportsTypedArrays()) {
return {};
}
.... rollup choked, saying that you can't have a return statement outside of a function. Maybe refactoring the files to use an IIFE, and only have one top-level return, would fix this?
After commenting all of those early-return lines out, Rollup runs for a few seconds, but then I get this error, like it's trying to include CSS somewhere?
I spent a little time trying to get this to work, and (SPOILER) didn't solve it, but thought I'd post what I tried here in case anyone has ideas, or just wants to avoid making the same mistakes.
In both cases, I changed the gltf-pipeline
index.js
entrypoint to a minimal subset that still included Cesium:And, created an entry point to Cesium that didn't wrap with RequireJS:
Browserify + deamdify
Let's try Browserify's deamdify transform.
Also added this to Cesium's package.json:
It seemed to run, but I was getting errors about opening too many files, despite already having
ulimit -n 10000
set.Rollup + rollup-plugin-amd
Used rollup-plugin-amd and some other stuff.
Rollup config:
Problems encountered:
Anywhere this pattern is used:
.... rollup choked, saying that you can't have a
return
statement outside of a function. Maybe refactoring the files to use an IIFE, and only have one top-level return, would fix this?After commenting all of those early-return lines out, Rollup runs for a few seconds, but then I get this error, like it's trying to include CSS somewhere?