Throw exception by using custom build at version 3.2.1
woody-li opened this issue · comments
woody-li commented
I'm using a custom build from example at http://docs.mathjax.org/en/latest/web/webpack.html#a-custom-mathjax-build
It throw a exception after updated to version 3.2.1.
Uncaught ReferenceError: require is not defined.
At "node_modules/mathjax-full/js/components/version.js".
exports.VERSION = typeof PACKAGE_VERSION === 'undefined' ? function() {
var load = eval('require');
var dirname = eval('__dirname');
var path = load('path');
return load(path.resolve(dirname, '..', '..', 'package.json')).version;
}() : PACKAGE_VERSION;
Questions:
- Is there any using change for it?
- Why the code using "eval", some code quality tool treat it as a vulnerability issue.
Ryan Graham commented
Duplicate of #818
Can you add your use case & bundler to that thread too please?
woody-li commented
Thanks and sorry.
There's some mistake in my config causes the exception.