siefkenj / unified-latex

Utilities for parsing and manipulating LaTeX ASTs with the Unified.js framework
MIT License
85 stars 20 forks source link

Do not externalize ESM in cjs #34

Closed James-Yu closed 1 year ago

James-Yu commented 1 year ago

This is a follow-up of #33 aiming to address #32, in particular the second route of https://github.com/siefkenj/unified-latex/issues/32#issuecomment-1562230505 . Merging this PR can close #32 .

I figure this fix favorable as otherwise the produced .cjs won't work with cjs-only platforms, e.g., electron.

The regex is taken from https://github.com/siefkenj/unified-latex/blob/main/package.json#L14-L16

siefkenj commented 1 year ago

The tests seem to be failing. Do they work on your local machine?

James-Yu commented 1 year ago

It also caused some trouble on my side. I will look into the issue and fix it soon.

James-Yu commented 1 year ago

The tests seem to be failing. Do they work on your local machine?

Finally done! This one should be good to merge at your discretion.

siefkenj commented 1 year ago

Thanks!