Monday, 26 August 2019

Stencil JS not working with non-default imports

I'm using BabylonJS in a StencilJS app, and I can only seem to import in a very specific way.

For instance I can't do:

import { Engine, Scene } from "babylonjs";

It says 'Engine' is not exported by node_modules\babylonjs\babylon.js But it is..

I can do:

import BABYLON from 'babylonjs';

and use it like

private _scene: BABYLON.Scene;

I'd like for the former to work. Any advice?

The first way is how most tutorials do it, and I refuse to believe SencilJS is just not capable of that. I must be missing something



from Stencil JS not working with non-default imports

No comments:

Post a Comment