Closed ruapho closed 8 months ago
Hi @ruapho , which chart.js version do you use? Is it possible to share your package.json and your ui5.yaml. Wondering a bit since I have tests for the chart.js generation in the ecosystem and I should have noticed this...
@ruapho - I tried to reproduce your issue by doing the following steps:
yo easy-ui5 ts-app
webapp/test/e2e
folder due to get rid of some warnings for wdi5 I need to follow up independentlynpm i chart.js
npm i ui5-tooling-modules@3.2.7
ui5.yaml
import x from "chart.js";
and make sure to use x, e.g. console.log(x);
3.3.0
and run the build => WORKSThe issues with the JSModuleAnalyzer
are related to the UI5 Tooling trying to add chart.js to the preload bundle and it has some issues to understand the generated JS syntax (most probably higher than es2022). But this is also not related to what you faced.
Unfortunately, I can't reproduce your issue... If you can provide me an example to reproduce I may have a chance to fix that...
Hi,
I've created a simple project to reproduce the error: https://github.com/ruapho/u5_issue_977
README states on how to reproduce the error.
I actually narrow the scope of the error away from chart.js. I actually include a folder libs
where the microsoft.cognitive.speech.sdk
is included. When this is removed the build succeeds and chart.js is included correctly.
I wasn't able to include microsoft.cognitive.speech.sdk
as dependency like chart.js: If I remember correctly because it hooks into the window object.
@ruapho - thanks for the sample to reproduce - I'll follow up the next days on this.
Unfortunately, not all 3rd party libs can be bundled with the ui5-tooling-modules
. It also depends on whether they use native Node.js modules which can't be polyfilled in the browser and also what kind of module format it is. Normally, all standard module formats should work but I have also seen strange modules in the past. But, I'll check...
@ruapho thanks for your example - I could successfully reproduce the issue and also spotted the source of it. Fix is about to be provided and will be released in the next 30 mins. THX for pointing this out.
Just FYI: the issue was related due to the detection of the fs
dependency from the microsoft speech module. This hasn't been detected as to be ignored during the bundling process and I corrected this detection now. With my change I now also introduce a better error handling to ensure that these kind of errors can be better spotted in the future...
THX again!
Describe the bug After updating the dependency
"ui5-tooling-modules": "3.2.7"
to"ui5-tooling-modules": "3.3.0"
the build starts to fail withTo Reproduce customtasks looks like this:
With
"ui5-tooling-modules": "3.2.7"
it compiles correctly while and copying the dependencychart.js
to\dist\resources\chart.js\auto.js
. Dependency is correctly defined and transpiled to js:Changing from
chart.js/auto
tochart.js
is not working.After update to 3.3.0 this error happens:
It seems like the minify tasks fails because the ui5-tooling-modules-task is not generating correct output.
Expected behavior A minor feature upgrade should not break existing builds.
I've looked through the changelog and some code and cannot see why this breaks. But it is preventing me from updating and (as of now) current version is already 3.4.4.