dimforge / rapier.js

Official JavaScript bindings for the Rapier physics engine.
https://rapier.rs
Apache License 2.0
418 stars 57 forks source link

Include Typescript source in npm package #3

Closed canadaduane closed 3 years ago

canadaduane commented 3 years ago

When using webpack's source-map-loader in development mode, the plugin is unable to see Rapier's source files and provides many warnings:

./node_modules/@dimforge/rapier3d/dynamics/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/duane/Projects/relm5/node_modules/@dimforge/rapier3d/dynamics/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/duane/Projects/relm5/node_modules/@dimforge/rapier3d/dynamics/index.ts' client:135
./node_modules/@dimforge/rapier3d/dynamics/integration_parameters.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/duane/Projects/relm5/node_modules/@dimforge/rapier3d/dynamics/integration_parameters.ts' file: Error: ENOENT: no such file or directory, open '/Users/duane/Projects/relm5/node_modules/@dimforge/rapier3d/dynamics/integration_parameters.ts'
...

Could these files be included in the npm package in order to help with stack trace debugging?

sebcrozet commented 3 years ago

Hi! I'm transfering this issue to the rapier-js repository. Yes, we can add the typescript files to the NPM package.