Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q: why must the import be done in onMount? #14

Open
geoidesic opened this issue Jun 17, 2021 · 2 comments
Open

Q: why must the import be done in onMount? #14

geoidesic opened this issue Jun 17, 2021 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@geoidesic
Copy link

I'm wondering why we can't just do:

<script>
    import BABYLON from 'babylonjs'
</script>

instead of

  onMount(async () => {
    const babylonjs = await import('babylonjs');
    BABYLON = babylonjs.default;
  });

?

@rogueyoshi
Copy link
Member

rogueyoshi commented Jun 17, 2021 via email

@rogueyoshi
Copy link
Member

But that actually reminds me, Babylon has partial server side rendering now. It can ship generated scenes from the server to the client. I will add that to the TODO.

@rogueyoshi rogueyoshi self-assigned this Jun 19, 2021
@rogueyoshi rogueyoshi added the question Further information is requested label Jun 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants