Description
Hi,
I'm using plotly.js with ionic and I am very happy with it. But when I trie to minify the project during build for production, there is a strange Error. All other Errors are gone with the newest Version (1.37.0). I had the same issues with V 1.35.2 .
Does someone has a clue whats the problem and how I can solve it?
[12:45:38] Error: ./node_modules/plotly.js/src/plots/cartesian/axes.js Module parse failed: Error parsing regular
expression: Invalid regular expression: / newDiff + 1e-6) % 1 < 2e-6 &&(((newFirst - ax._forceTick0) /:
Unmatched ')' (185:53) You may need an appropriate loader to handle this file type. | // and forceTick0 can
be shifted to newFirst | if (function (ax, _minDtick) { | if (_minDtick === void 0) { _minDtick = / newDiff
+ 1e-6) % 1 < 2e-6 &&(((newFirst - ax._forceTick0) / newDiff % 1) + | 1.000001) % 1 < 2e-6; } | ax._minDtick
= newDiff; @ ./node_modules/plotly.js/src/transforms/sort.js 10:11-45 @ ./node_modules/plotly.js/lib/sort.js
@ ./node_modules/plotly.js/lib/index.js @ ./src/pages/statSites/statQuestionnaire/statQuestionnaire.ts @
./src/pages/statSites/statQuestionnaire/statQuestionnaire.ngfactory.ts @ ./src/app/app.module.ngfactory.ts @
./src/app/main.ts
Error: ./node_modules/plotly.js/src/plots/cartesian/axes.js
Module parse failed: Error parsing regular expression: Invalid regular expression: / newDiff + 1e-6) % 1 < 2e-6 &&(((newFirst - ax._forceTick0) /: Unmatched ')' (185:53)
You may need an appropriate loader to handle this file type.
| // and forceTick0 can be shifted to newFirst
| if (function (ax, _minDtick) {
| if (_minDtick === void 0) { _minDtick = / newDiff + 1e-6) % 1 < 2e-6 &&(((newFirst - ax._forceTick0) / newDiff % 1) +
| 1.000001) % 1 < 2e-6; }
| ax._minDtick = newDiff;
@ ./node_modules/plotly.js/src/transforms/sort.js 10:11-45
@ ./node_modules/plotly.js/lib/sort.js
@ ./node_modules/plotly.js/lib/index.js
@ ./src/pages/statSites/statQuestionnaire/statQuestionnaire.ts
@ ./src/pages/statSites/statQuestionnaire/statQuestionnaire.ngfactory.ts
@ ./src/app/app.module.ngfactory.ts
@ ./src/app/main.ts
at BuildError.Error (native)
at new BuildError (/home/aiko/IdeaProjects/etmos_the/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at callback (/home/aiko/IdeaProjects/etmos_the/node_modules/@ionic/app-scripts/dist/webpack.js:119:28)
at emitRecords.err (/home/aiko/IdeaProjects/etmos_the/node_modules/webpack/lib/Compiler.js:265:13)
at Compiler.emitRecords (/home/aiko/IdeaProjects/etmos_the/node_modules/webpack/lib/Compiler.js:371:38)
at emitAssets.err (/home/aiko/IdeaProjects/etmos_the/node_modules/webpack/lib/Compiler.js:258:10)
at applyPluginsAsyncSeries1.err (/home/aiko/IdeaProjects/etmos_the/node_modules/webpack/lib/Compiler.js:364:12)
at next (/home/aiko/IdeaProjects/etmos_the/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/home/aiko/IdeaProjects/etmos_the/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (/home/aiko/IdeaProjects/etmos_the/node_modules/tapable/lib/Tapable.js:222:13)