proyecto26 / ion-phaser

A web component to use Phaser Framework with Angular, React, Vue, etc 🎮
https://market.ionicframework.com/plugins/ionphaser
MIT License
252 stars 39 forks source link

React demo Can't import the named export 'b' from EcmaScript module #2

Closed stahlmanDesign closed 5 years ago

stahlmanDesign commented 5 years ago

I'm trying to use Phaser with React.

I installed with npm install @ion-phaser/core --save and npm install @ion-phaser/react --save and then tried to run the code in this demo: https://github.com/proyecto26/ion-phaser/tree/master/react

I'm using create-react-app and React 16.8.6

image
jdnichollsc commented 5 years ago

Hi @stahlmanDesign, thanks for reporting this issue! Can you try installing yarn add @ion-phaser/react only? Let me know please 👍

stahlmanDesign commented 5 years ago

I'm not using yarn, but when use npm install @ion-phaser/react without @ion-phaser/core the result is the same error.

I tried to create a codepen but @ion-phaser/react is not hosted at the same CDN as the core: https://unpkg.com/@ionic/core@4.4.2/dist/ionic.js

https://codepen.io/stahlmandesign/pen/bXBGxE?editors=1111

jdnichollsc commented 5 years ago

try with this https://unpkg.com/@ion-phaser/react@1.1.0/dist/index.js

stahlmanDesign commented 5 years ago

That doesn't seem to be the expected code. The entire contents of https://unpkg.com/@ion-phaser/react@1.1.0/dist/index.js are just:

export * from './components';
//# sourceMappingURL=index.js.map
jdnichollsc commented 5 years ago

Can you debug from the demo-react folder please? https://github.com/proyecto26/ion-phaser/blob/master/demo-react/package.json#L6

jdnichollsc commented 5 years ago

@stahlmanDesign check the dist folder and let me know please 👍 https://unpkg.com/browse/@ion-phaser/react@1.1.0/dist/

jdnichollsc commented 5 years ago

I've reported this error, I was able to reproduce this issue from Vue.js https://github.com/ionic-team/stencil/issues/1842

jdnichollsc commented 5 years ago

Try the last version 1.2.0 and let me know 👍