1

I have a question on how to combine matterjs with typescript in webpack. When I try it now the problem is that I cannot export Matter from matter-js.

I tried using this npm Import matter-js in typescript project.

But when I try to import Matter it says the there is no export module.

Someone experiences with this?

My import

import  Matter  from "matter-js";

Module '"c:/code/platformer/platformer_typescript/node_modules/@types/matter-js/index"' has no default export.

This is my error message.

  • 1
    Please show your current code which attempts to import Matter, and the _exact_ error message you receive, otherwise it's not as easy to help – kingdaro Apr 30 '18 at 20:35

1 Answers1

0

I guess just install the typings for matterjs library no?

https://www.npmjs.com/package/typings

Jacek Pietal
  • 1,980
  • 1
  • 18
  • 27