I have a simple example project with a sphere and cube. The Cube has a custom script called “Spin” that simply spins on the Y axis. At first, the custom script worked in the Editor but it does not load at runtime in my app with this warning:
BJS - [08:37:56]: Script named “Spin” has been ignored on object “Cube” as there is no exported script. Please use “exportScript(ctor);” or export the script as default class for ES6 support."
I am loading the metadata when I load the scene:
SceneLoader.Append(
`${scenePath}`,
`${sceneFile}`,
this._bootstrapScene,
(scene: Scene) => {
/**/
// Load extensions
let projectPath = `${scenePath}${projectFile}`;
Tools.LoadFile(
projectPath, (data: string) => {
console.log(`Loaded ${projectPath}`);
// Apply extensions (such as custom code, custom materials etc.)
Extensions.RootUrl = scenePath;
Extensions.ApplyExtensions(scene, JSON.parse(data));
});
/**/
this._sceneStack.push(scene);
}
);
I am attempting to use Typescript/ES6 with Webpack.

I load from the “Export Final Scene & Assets” export workflow. The scene loads properly at runtime except this warning/issue. I have attached the editor files and you can see the custom script is in there and assigned to Cube. Now it does not run in the Editor, either.
simple.zip (92.1 KB)
) that is similar to a Unity-style workflow. Ideally I can load a scene at runtime with some minimal bootstrapping. The script itself is pretty standard so I didn’t think it was worth including but here it is:
