Skip to content
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

Problem with library usage and Webpack #132

Closed
etherealmachine opened this issue Jul 27, 2021 · 4 comments
Closed

Problem with library usage and Webpack #132

etherealmachine opened this issue Jul 27, 2021 · 4 comments

Comments

@etherealmachine
Copy link

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 from latex.js/dist:

$ ls node_modules/latex.js/dist/
css  fonts  js  latex.js  latex.js.map  latex.mjs  latex.mjs.map
@timothepearce
Copy link

Same problem here!

@TianMing2018
Copy link

TianMing2018 commented Aug 6, 2021

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

@jorge-menjivar
Copy link

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;",

@michael-brade
Copy link
Owner

@jorge-menjivar true, I didn't create a new release until yesterday... but now with 0.12.6 it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants