-
Notifications
You must be signed in to change notification settings - Fork 30
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
Webpack and Rollup support #152
Comments
Or rollup, I guess... |
Any updates on this? The only thing that attempts to do citations with bibliography seems to be distill. And there are several issues with it:
So I want to attempt factoring out that citation mechanic as a separate module to allow for something akin to the |
I personally never use Webpack and I never got around to try making it work yet. However, I think that it should work mostly apart from an issue that should be fixed in the next release (citation-js/citation-js#156, citation-js/citation-js#150). |
Thank you for the promt response - I just realized that there is also the I am getting some warnings when compiling with rollup, e.g.:
and in the browser |
So the main repository with all the code is https://github.com/citation-js/citation-js, which is published on npm as
It looks like the main cause is that the browser-specific alternatives to |
I tried import { nodeResolve } from "@rollup/plugin-node-resolve";
// ...
nodeResolve({browser: true}), but that did not appear to change any of the warnings. I think I'll take a break from this today |
Hm, I'll have to try that at some point. Apart from that, let me know if I can help. |
If you want to take a look: https://github.com/FelixBenning/bibcite it is pretty much a minimum working example at this point since I have just started with the configuration of rollup, optimistically created a bunch of class skeletons and tried to import this library |
So by trial and error I found a number of things to improve:
To solve step 2 and 3 you can also use the npm package |
Regarding the first point, |
Thank you so much! Then I'll switch back from astrocite later |
Okay so I tried all these changes but it already does not like const bib = new Cite() the browser says
and using const bib = Cite() results in
see commit: https://github.com/FelixBenning/bibcite/tree/8ace4b5b4c0dc60dae1b0e2669a221aa603809c7 |
Okay so if you use |
I actually switched to Fortunately I have realized that this entire parsing business is orthogonal to my problem anyway. Zotero can in fact export |
Sounds good.
Normally this, unless that doesn't work. import '@citation-js/plugin-bibtex' |
See #151
The text was updated successfully, but these errors were encountered: