PhaserEditor2D / PhaserEditor

A friendly IDE to develop HTML5 games based on the Phaser framework.
https://phasereditor2d.com
Eclipse Public License 1.0
327 stars 45 forks source link

How to import js modules to the Phaser Editor #136

Closed dedalik closed 4 years ago

dedalik commented 4 years ago

Version

Description

Hello! Can understand how to import modules to the scene and others .js files?

For example, I have UIScene.js and wont to import Constants, from folder:

import someValue from '../folder';

and receive the error: Uncaught SyntaxError: Cannot use import statement outside a module.

PhaserEditor2D commented 4 years ago

Hi, I was testing this bug. Did you fix it?

dedalik commented 4 years ago

Hi, no need to import module throw import, js files in pack.json are in Editor scope.

PhaserEditor2D commented 4 years ago

Yes, and are part of the loader progress.