phaser3-rex-notes icon indicating copy to clipboard operation
phaser3-rex-notes copied to clipboard

Circular import in TweakerShell

Open rui-han-crh opened this issue 2 years ago • 1 comments

Thank you for this amazing UI plugin, this is the most extensive and well designed UI system I've come across for Phaser! ❤️

Issue

There is a circular import in TweakerShell.

   node_modules/phaser3-rex-plugins/templates/ui/tweaker/TweakerShell.js
-> node_modules/phaser3-rex-plugins/templates/ui/tweaker/methods/Methods.js
-> node_modules/phaser3-rex-plugins/templates/ui/tweaker/methods/AddFolder.js
-> node_modules/phaser3-rex-plugins/templates/ui/tweaker/builders/CreateFolder.js
-> node_modules/phaser3-rex-plugins/templates/ui/tweaker/gameobjects/utils/CreateTweaker.js
-> node_modules/phaser3-rex-plugins/templates/ui/tweaker/TweakerShell.js

How to Reproduce

Using rollup, install the rexUI plugin and import into the config.ts file

import UIPlugin from 'phaser3-rex-plugins/templates/ui/ui-plugin.js';

const config = {
    type: Phaser.AUTO,
    width: 1080,
    height: 1920,
    resolution: window.devicePixelRatio,
    scale: {
        mode: Phaser.Scale.FIT,
        autoCenter: Phaser.Scale.CENTER_HORIZONTALLY
    },
    scene: [DemoScene],
    plugins: {
        scene: [
            {
                key: 'rexUI',
                plugin: UIPlugin,
                mapping: 'rexUI'
            }
        ]
    }
};

During transpilation, Rollup will signal a circular import image

rui-han-crh avatar Jul 27 '23 02:07 rui-han-crh

I know this issue. Fortunately, the exporting of using rollup/webpack tool-chain is still working, so I choose ignoring this issue.

rexrainbow avatar Jul 27 '23 03:07 rexrainbow