ChristopherChudzicki / math3d-react

A user-friendly 3d graphing calculator for the web. Create, share, and animate 3d mathematical scenes.
https://www.math3d.org
Mozilla Public License 2.0
245 stars 34 forks source link

repair many ref error: path issue. #353

Open eaglexmw-gmail opened 2 years ago

eaglexmw-gmail commented 2 years ago

fix bug: import module from invalid path. all compile/test ok.

ChristopherChudzicki commented 1 year ago

Hi @eaglexmw-gmail Thanks for opening a PR.

Those imports are not broken since math3d uses NODE_PATH=src/, the src directory is searched for modules before node_modules.

Admittedly, this is not really a great way to implement absolute imports... I think for the rewrite of math3d (in the works) I'll use something like craco to patch create react app to have @/blah as absolute import of blah.

https://github.com/ChristopherChudzicki/math3d-react/blob/e2165eef17cbabe08074b5de725b2e4ab403e444/client/.env#L5