Closed Wyzix33 closed 5 years ago
The problem is the TerserPlugin
configuration in the webpack.config.js
file. It minifies (mangles) the variables names and presumably it does not convert all of the quoted variables in the exact-math
module, thus it causes some bugs. You can disable mangling in your webpack config file and it fixes the problem.
optimization: {
minimizer: [
new TerserPlugin({
parallel: true,
terserOptions: {
mangle: false
},
}),
new OptimizeCssAssetsPlugin({}),
],
},
Hi, it works now, but doing this also adds about 400kb on my final js files, so for now i will include it by src and will try to integrate exact-math tests into my tests to see if everything is OK. Thank you for your help and great job with the library.
Try to reinstall exact-math
with the new @2.1.0 version. I've fixed the of-type
dependency that compares constructors now rather than their names that are mangled, so it can be now minified with your initial TerserPlugin
configuration. I've implemented the TerserPlugin
to my webpack config and it seems to work with all tests passed
It works! Thanks
Hi, I get this error when i try to execute a simple formula:
this is the only line i use exact-math on this page:
This formula works in --mode=development but not in --mode=production.
I manage to make it work in production by importing from src like this:
My setup: I'm using https://github.com/WeAreAthlon/frontend-webpack-boilerplate on Windows 10
Thanks