-
-
Notifications
You must be signed in to change notification settings - Fork 19
Unable to use library in typescript project complied with rollup #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please be sure, that your configuration files are correct. |
Yeah, everything appears to be correct. I think it's probably more of a specific rollup issue, was just hoping maybe you had some insight into how it should work. |
In case anybody else running into this problem, I'm hoping it'll be answered by this Stack Overflow thread. |
You have to tell the 'rollup-commonjs-plugin' to convert your imported library's modules into a format Rollup can use: In your rollup config edit the part concerning the commonjs-plugin:
|
I'm importing the package into a typescript project that's compiled with rollup. Unfortunately, when I try to build with this referenced (
import { AStarFinder } from "astar-typescript";
) rollup fails with the error:I've fiddled around with various plugin changes and options for
plugin-commonjs
(stuff like adding it to the includes list to force it to be parsed as a CommonJS module but nothing seems to work. Can someone help me figure out the incantation to get this working with rollup?This is more of a rollup question I suppose, but if you have any thoughts or ideas around ways to get it working that would be great!
The text was updated successfully, but these errors were encountered: