Closed swayongshen closed 6 months ago
Make sure that you use the addToNamespace
option in the ui5.yaml
for the ui5-tooling-modules
:
ui5.yaml
[...]
builder:
customTasks:
- name: ui5-tooling-modules-task
afterTask: replaceVersion
configuration:
addToNamespace: true
It ensures to include the fabric.js
in the namespace of your application.
You can find more about this option here: https://www.npmjs.com/package/ui5-tooling-modules
Problem: I have a UI5 Typescript library with some custom controls that depend on fabricjs. I have added
ui5-tooling-modules-task
as acustomTask
andfabricjs
is indeed bundled asdist/resources/fabric.js
when the library is built.However, in the application that consumes this library, when my control is loaded, this error is shown which suggests that the application is trying to load its own version of
fabric.js
instead of using the one from my library.