-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ts][phaser] Bug on build with webpack "You may need an appropriate loader to handle this file type." #2548
Comments
Can you share your webpack and Babel configs? Our NPM package is just a plain old ES6 module. Webpack and Bable should not have any issue with that. |
Will re-open if you provide the information I asked for. |
when i use spine-player in vue-cli like import { SpinePlayer } from '@esotericsoftware/spine-player'; i also get this error my babel config is below |
Hi All! "Will re-open if you provide the information I asked for." ...Sorry for the late reply :D I'm sharing my webpack & babel configuration, also my package.json, I know that its a bit old but its works with any other library. Also I'm sharing my current workaround, hope this helps to solve this issue and other people who had an struggle with that :D What i'm doing right now is to donwload last dist build url from https://es.esotericsoftware.com/spine-phaser , p.e. In my "canvas object" I have
This is my webpack configuration var phaserModule = path.join(__dirname, '../node_modules/phaser/') function resolve (dir) { module.exports = { }, This is my installed packages configuration
` Thanks! |
I'm sorry, but the information you are providing is too confused and lacks of information. Moreover it seems that you are using webpack 2.6.1 that was released in 2017. I tested the Please, provide us with a minimal reproduction project of the problem and I'll be happy to help assist you. If you want you can send the project to contact@esotericsofware.com |
HI!
I cannot integrate phaser into the webpack build, it says "You may need an appropriate loader to handle this file type.". I've tried some babel preset like 2015 or 2020. If I include into the html as vanila JS it works well... any hint?
`in ./~/@esotericsoftware/spine-phaser/dist/SpineGameObject.js
Module parse failed: /home/rai/workspace/toolbox/toolboxw/node_modules/@esotericsoftware/spine-phaser/dist/SpineGameObject.js Unexpected token (56:13)
You may need an appropriate loader to handle this file type.
| /** A bounds provider that calculates the bounding box by taking the maximumg bounding box for a combination of skins and specific animation. */
| export class SkinsAndAnimationBoundsProvider {
| animation;
| skins;
| timeStep;
`
Thanks!
The text was updated successfully, but these errors were encountered: