Open dievardump opened 5 months ago
0.1.1
I'm trying to use this plugin with Next.js, and when compiling / loading a page I get this error:
./node_modules/phaser-font-plugin/dist/index.mjs Attempted import error: 'phaser' does not contain a default export (imported as 'i').
as the error says, it seems Phaser does not export a default so the way you import it with
import Phaser from 'phaser'
creates an error. I guess it doesn't for you because you build with a builder that might just do the magic, but Next doesn't.
Would it be possible for you to use the form
import * as Phaser from 'phaser'
or simply use the modules (Plugins / Loader) directly?
import { Plugins } from 'phaser';
import { Loader } from 'phaser';
No response
👋 @dievardump Thanks for opening your first issue here! We'll try to help you as soon as possible.
If you like this project, please ⭐ star our repo.
Version
0.1.1
Describe the problem
I'm trying to use this plugin with Next.js, and when compiling / loading a page I get this error:
as the error says, it seems Phaser does not export a default so the way you import it with
creates an error. I guess it doesn't for you because you build with a builder that might just do the magic, but Next doesn't.
Would it be possible for you to use the form
or simply use the modules (Plugins / Loader) directly?
Additional info
No response