mattjennings / svelte-pixi

Create PixiJS apps with Svelte
https://svelte-pixi.com
MIT License
112 stars 15 forks source link

won't build/run with last sveltekit version #23

Closed llPekoll closed 2 years ago

llPekoll commented 2 years ago

hi, The repo is working perfectly on svelte latest version, on your sveltekit exemple

but it won't build on lastest sveltekit version. SvelteKit v1.0.0-next.357 npm run dev -> WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support. npm run build ->

/Users/peko/work/sandbox/nlt/nlt-website/node_modules/pixi.js/dist/esm/pixi.js:8
import '@pixi/polyfill';
^^^^^^

SyntaxError: Cannot use import statement outside a module

I'll go with your example it's fine, just want to let you know

llPekoll commented 2 years ago

My bad, made it work with

{#await import('$lib/PixiApp.svelte') then app}
  <svelte:component this={app.default} />
{/await}

just like your exemple