Skip to content

.then() never fires #5

Description

@aceofpack

Hello,

Thanks for the great package albeit not seeing the then() fire once complete:

    this.game.plugins.add(WebpackLoader, AssetManifest)
      .load()
      .then(() => {
        console.log('loaded assets...')
        this.game.state.start('Start');
      })
      .catch(err => {
        console.error(err);
      });

My AppManifest looks like this:

  sprites: [
    'buttons/btn_blank_small.png',
    'buttons/btn_blank_big.png',
    'buttons/btn_blank_square.png',

   ...
    
  ],
  fonts: [
    'gooddog.ttf',
    'gooddog.woff',
    'gooddog.woff2',
  ]
};

I added the below to the webpack.config.js:

      {
        test: /\.(eot|svg|ttf|woff|woff2)$/,
        loader: 'file-loader?name=assets/fonts/[name].[ext]?[hash]'
      },

It moves the files ok.. the font works and is referenced in the css ok. I don't know why the then() doesn't fire - seems the promise is never returned.

Any help much appreciated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions