# Invalid Scene Plugin: UIPlugin

**URL:** <https://phaser.discourse.group/t/invalid-scene-plugin-uiplugin/1289>\
**Category:** Phaser 3\
**Created:** [February 18, 2019, 6:22pm UTC](https://phaser.discourse.group/t/invalid-scene-plugin-uiplugin/1289 "2019-02-18T18:22:07Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![mb07](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@mb07](https://phaser.discourse.group/u/mb07)\
**Post date:** [March 27, 2019, 8:07pm UTC](https://phaser.discourse.group/t/invalid-scene-plugin-uiplugin/1289/5 "2019-03-27T20:07:08Z")

</div>

@yannick thank you! It took me a little time to get it work fine but finally I could solve my problem. I add it here what I did just in case someone finds it useful. My final project structure is this:

```
├── dist
│ └── index.html
├── firebase.json
├── package.json
├── src
│ ├── app.js
│ ├── assets
│ │ └── .jpg, .png files...
│ ├── gameService.js
│ ├── loginService.js
│ └── scenes
│ ├── game.js
│ ├── main.js
│ └── ranking.js
└── webpack.config.js

```

Using NPM I installed _webpack_, _file-loader_, _Phaser_, _phaser3-rex-plugins_, etc. (indeed, you can see from my project structure that I no longer save the plugin files locally). My webpack configuration is the below:

```
const path = require('path');

module.exports = {
    mode: "development",
    entry: './src/app.js',
    output: {
        filename: 'index.js',
        path: path.resolve(__dirname, 'dist')
    },
    module: {
      rules: [
       {
         test: /\.(png|jpg)$/,
         use: [
           'file-loader'
         ]
       }
      ]
    }
};

```

Now, I can import the plugin in `app.js` like you suggested:

```javascript
import UIPlugin from "phaser3-rex-plugins/templates/ui/ui-plugin.js";

```

and add it to the game config.

I can also import assets like images using the _file-loader_ in webpack and use them wherever they are needed.

The last thing left is to run `webpack` from the terminal and access `/dist/index.html` in the browser.

---

_[View the full topic](https://phaser.discourse.group/t/invalid-scene-plugin-uiplugin/1289)._
