777genius / 777genius/phaser3-swipe-plugin
Issue adding the plugin to phaser3-typescript-project-template
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
Thank you for sharing! I try to use your plugin with https://github.com/photonstorm/phaser3-typescript-project-template but I've some issues. I've added in `rollup.config.dev.mjs`:
```
commonjs({
include: [
'node_modules/eventemitter3/**',
'node_modules/phaser/**',
'node_modules/phaser3-swipe-plugin/**'
],
```
In the game.ts the lib is linked via `import { SwipePlugin } from 'phaser3-swipe-plugin';` but I got an `Uncaught ReferenceError: Phaser is not defined`. Any ideas?
Copy/paste your plugin code directly inside the game.ts works fine.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with rollup.config.dev.mjs and game.ts in the phaser3-typescript-project-template, reviewing the listed CommonJS includes and the import of phaser3-swipe-plugin. Reproduce the Uncaught ReferenceError: Phaser is not defined; done means the plugin can be imported and used without that runtime error, while the plugin code remains external to game.ts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rollup, typescript
- Domain
- build-system, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100