Cannot resolve relative imports
re-thc opened this issue · comments
Harry Chan commented
Hi, when trying to run this library (great work for supporting chartjs 3.0) the error below appears:
Rollup failed to resolve import "utils/noop" from "..\node_modules\chartjs-react\es\ReactChart.js".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`rollupInputOptions.external`
There's a similar error for generateID
It looks like it's because utils/noop
and utils/generate-id/generateID
aren't specified as relative imports, i.e. with ./
in front, so it thinks it's a separate module elsewhere (and tries to find it in node_modules). Thanks!
xr0master commented
Hey. Thank you for report.
Yes, you are right, it's because I am using paths in tsconfig. It's better to remove it.
"paths": {
"*": ["src/*"]
}
xr0master commented
fixed in v3.1.2