Giter Club home page Giter Club logo

Comments (6)

SC0d3r avatar SC0d3r commented on May 17, 2024

make sure to add two files with the same name but one .fnt ext and another with .png ext in assets/fonts
to create bitmapFonts
and then run $npm run assets then go and check the assets.ts File, and see if namespace BitmapFonts with yourFontName class is created or not if this is not your current problem take a screenshot of errors and post them

from phaser-ce-npm-webpack-typescript-starter-project.

rroylance avatar rroylance commented on May 17, 2024

#39 has been merged in with some asset generation fixes; please try the latest version out. Thanks!

from phaser-ce-npm-webpack-typescript-starter-project.

Nepoxx avatar Nepoxx commented on May 17, 2024

That did not fix the issue.

The issue stems from: 1337programming/webpack-shell-plugin#37

You can fix it by replacing

new WebpackShellPlugin({
  onBuildStart: ['npm run assets']
}),

with

new WebpackSynchronizableShellPlugin({
  onBuildStart: {
    scripts: ['npm run assets'],
    blocking: true,
    parallel: false
  }
}),

in your webpack config (npm install webpack-synchronizable-shell-plugin --save-dev of course)

Basically in certain conditions, the typescript compiler could start before the npm run assets was done. I'll make a merge request.

from phaser-ce-npm-webpack-typescript-starter-project.

rroylance avatar rroylance commented on May 17, 2024

@Nepoxx Huh, interesting, I've never encountered that one. Thanks so much for doing the research and providing the PR! Much appreciated 👍

from phaser-ce-npm-webpack-typescript-starter-project.

Nepoxx avatar Nepoxx commented on May 17, 2024

@rroylance I've never encountered the issue myself someone was not able to build our project due to this. Since it's a race condition it needs specific timings to occur, I think. In any case using WebpackSynchronizableShellPlugin should fix the issue :)

from phaser-ce-npm-webpack-typescript-starter-project.

rroylance avatar rroylance commented on May 17, 2024

Merged in. Thanks again @Nepoxx !

from phaser-ce-npm-webpack-typescript-starter-project.

Related Issues (20)

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.