Closed etherealmachine closed 2 years ago
Same problem here!
try npm install latex.jx@0.12.1
related to use dynamic imports for external packages and documentclasses
link: https://github.com/michael-brade/LaTeX.js/tree/v0.12.2
It seems that although this issue was fixed, NPM did not pick up the update. Maybe because the previous and current version in package.json were both 0.12.4 (unchanged)?
The package downloaded from NPM still does not have the touch
code,
"devbuild": "rimraf 'dist/**/*.map';mkdirp dist/css;mkdirp dist/js;mkdirp dist/fonts;mkdirp dist/documentclasses;mkdirp dist/packages;rsync -a src/css/ dist/css/;rsync -a src/fonts/ dist/fonts/;rsync -a node_modules/katex/dist/fonts/*.woff dist/fonts/;rsync -a src/js/ dist/js/;mkdirp bin;lsc -bc --no-header -m embedded -p src/cli.ls > bin/latex.js;chmod a+x bin/latex.js;rollup -c;",
@jorge-menjivar true, I didn't create a new release until yesterday... but now with 0.12.6 it should work.
There seems to be a problem with the dependency chain when using as a library with Webpack. From a fresh install with
yarn add latex.js
, I get version^0.12.4
, but during build I see:ModuleNotFoundError: Module not found: Error: Can't resolve './documentclasses' in '{elided}/node_modules/latex.js/dist'
It's possible there's a problem with my Webpack configuration, but I also noticed that the
documentclasses
folder is missing fromlatex.js/dist
: