Giter Club home page Giter Club logo

vue-phaser3's Issues

Why Phaser + Vue.js ?

I am using Phaser with Vue.js also. But I have a hard time to figure out why I use it with Vue.js 😄 ?
What is the benefit of using Phaser with Vue.js? Love to hear some good reasons!

Error: Loading chunk game failed.

Hi..I have a problem when working on project on serve mode using vue-cli-service serve. When I open the application, thus the chunk game is loaded but when I change something in the application and reload the page I get this error..

Error in mounted hook (Promise/async): "ChunkLoadError: Loading chunk game failed.

Screenshot from 2021-04-10 13-59-44

Phaser parent not taking effect

The issue seems to be with the components/Game.vue. The div is broken and there should only be one item in the template tag. This should fix the issue:

<template>
  <div>
    <div id="game-container"></div>
    <div class="placeholder" v-if="!downloaded">
      Downloading ...
    </div>
  </div>
</template>

How to import spine plug-ins

Looking forward to your answer!
This is the first time I have built a project in this way,Want to use spine plug-ins.But I don't know what to do.

import for game fails on Heroku

This line causes an error on Heroku deployment:
const game = await import(/* webpackChunkName: "game" */ '@/game')

This dependency was not found:
       
       * @/game in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Game.vue?vue&type=script&lang=js&
       
       To install it, you can run: npm install --save @/game
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `vue-cli-service build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/npmcache.o4QiG/_logs/2020-05-26T10_47_11_732Z-debug.log
-----> Build failed

Same line of code is working on local dev and local build.

Module build failed: SyntaxError: 'import' and 'export' may only appear at the top level (20:4)

Hello,
It's more a question than really an issue.
I didn't use all of your code, but tried to integrate most of it to my current project.

in Game.vue, in the mounted() event, you did this :

mounted() {
    import(/* webpackChunkName: "game" */ '@/game/game').then(game => {
      this.downloaded = true
      this.$nextTick(() => game.launch())
    })
  }

There it crashes for me, stating that import can only appear at top level.
But then I notice there is an annotation for webpack...
Any lead on how this works ?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.