Closed swayongshen closed 4 months ago
For anyone that is interested, use ui5-tooling-transpile
and include js files under filePattern
.
Hi @swayongshen,
sorry for not replying earlier. Seems that you found the filePattern
configuration property. There you can specify any additional file extension which should be handled by the tooling extension. By default it is .+(js|jsx)
for JS projects and .+(ts|tsx)
for TS projects. If needed it can be overruled like shown in the following ui5.yaml
: https://github.com/ui5-community/ui5-ecosystem-showcase/blob/main/showcases/ui5-tsapp/ui5.yaml#L12 even a bit more advanced using YAML anchors and reuse the config for the task and the middleware.
May not be specifically for
ui5-tooling-modules
, but let's say we have a filefile.ts
(ESModule) that we want to reference in our controller code, since its not written in UI5 AMD style, the default import as follows will result in an undefined variableFile
An alternative would be to assign the export from
file.ts
to the global window but that seems to be bad practice.file.ts
controller.ts
Since your team manages to load ESModule packages from NPM, I'm wondering if you have any expertise on making local ESModule files work the same way?