# PhaserMatterCollisionPlugin error

**URL:** <https://phaser.discourse.group/t/phasermattercollisionplugin-error/796>\
**Category:** Phaser 3\
**Created:** [January 17, 2019, 11:34am UTC](https://phaser.discourse.group/t/phasermattercollisionplugin-error/796 "2019-01-17T11:34:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![freddyatlantis](https://avatars.discourse-cdn.com/v4/letter/f/dc4da7/32.png) [@freddyatlantis](https://phaser.discourse.group/u/freddyatlantis)\
**Post date:** [January 17, 2019, 11:34am UTC](https://phaser.discourse.group/t/phasermattercollisionplugin-error/796/1 "2019-01-17T11:34:49Z")

</div>

hi all,  
i’ve used the Phaser 3 Webpack Project Template to set a my game, and am trying to get matter physics set up with the PhaserMatterCollisionPlugin, but on compile I get the following error message:`  
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////  
config.js:1 Uncaught Error: Module parse failed: Unexpected token (24:1)  
You may need an appropriate loader to handle this file type.  
| ]  
| }  
| };  
at eval (config.js:1)  
at Object…/src/config/config.js (project.bundle.js:13084)  
at **webpack\_require** (project.bundle.js:20)  
at eval (index.js:5)  
at Object…/src/index.js (project.bundle.js:13096)  
at **webpack\_require** (project.bundle.js:20)  
at eval (webpack:///multi\_(:8000/webpack)-dev-server/client?:2:18)  
at Object.0 (project.bundle.js:13239)  
at **webpack\_require** (project.bundle.js:20)  
at project.bundle.js:69

i’ve installed the plugin via npm, as per the online instructions, and this is my config.js  
/////////////////////////////////////////////////////////////////////////////  
import ‘phaser’;  
// import PhaserMatterCollisionPlugin from ‘…/phaser-matter-collision-plugin.js’;

export default {  
type: Phaser.AUTO,  
parent: ‘phaser-example’,  
width: 800,  
height: 600,  
physics: {  
physics: {  
default: “matter”  
},  
// Install the scene plugin  
plugins: {  
scene: [  
{  
plugin: PhaserMatterCollisionPlugin, // The plugin class  
key: “matterCollision”, // Where to store in Scene.Systems, e.g. scene.sys.matterCollision  
mapping: “matterCollision” // Where to store in the Scene, e.g. scene.matterCollision  
}  
]  
}  
};  
//////////////////////////////////////////////////////////////////////  
i’ve also tried to load the PhaserMatterCollisionPlugin locally, but that doesnt work either.

does anybody know how to get this plugin up and running with the Phaser 3 Webpack Project Template?

thanks in advance

---

<div class="post-metadata">

**Author:** ![MEJS](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/mejs/32/2427_2.png) [@MEJS](https://phaser.discourse.group/u/MEJS)\
**Post date:** [December 10, 2019, 9:34pm UTC](https://phaser.discourse.group/t/phasermattercollisionplugin-error/796/2 "2019-12-10T21:34:05Z")

</div>

@freddyatlantis do you know how to enable plugin?

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [December 10, 2019, 9:56pm UTC](https://phaser.discourse.group/t/phasermattercollisionplugin-error/796/3 "2019-12-10T21:56:09Z")

</div>

> **[Phaser Matter Collision Plugin Demo (Phaser v3.21.0) - CodeSandbox](https://codesandbox.io/s/loving-feather-vz9i9)**
>
> The online code editor tailored for web applications

---

<div class="post-metadata">

**Author:** ![MEJS](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/mejs/32/2427_2.png) [@MEJS](https://phaser.discourse.group/u/MEJS)\
**Post date:** [December 10, 2019, 10:03pm UTC](https://phaser.discourse.group/t/phasermattercollisionplugin-error/796/4 "2019-12-10T22:03:34Z")

</div>

@samme I change my import and everything is working: 😃

> import \* as PhaserMatterCollisionPlugin from “phaser-matter-collision-plugin”;
