Open MrChuzzle opened 1 month ago
Hi @MrChuzzle
this is a known limitation of the middlewares of the UI5 tooling. Once a middleware handles a resource and sends it back no other middleware will continue to process the resource. Without a bigger change of the UI5 tooling middleware concept, this issue can't be fixed easily.
For the tasks this is no problem as there the tasks run always after each other. There is not interruption.
I'll see what I can do - but I can't promise a quick solution on that...
Cc: @RandomByte @matz3
Ah, @MrChuzzle - just noticed one thing - I changed the implementation of the stringreplacer tooling extension a while back to intercept the response and allow to rewrite it.
Can you try one thing: exchange the order of the middlewares ui5-tooling-transpile-middleware
and ui5-tooling-stringreplace-middleware
? This may ensure that the stringreplace can intercept the response of transpile properly... Just a guess... BTW: the livereload
middleware should be always at the bottom to register as the first middleware because by using afterMiddleware compression, the first on is sorted after the compression middleware and the next one will be sorted in between compression and the previously registered one.
Hi @petermuessig, changing the order didn't solve the issue.
@MrChuzzle - do you run the server with https or http?
@petermuessig with http
Ok, thanks - I'll create a small example to verify it and to ensure support in future. I'm still not sure whether I can help without a bigger change in the UI5 tooling
Hi all,
I used the string replacer to define my app namespace. This works fine with the ui5 module syntax sap.ui.define and Object.extend("namespace.ClassName" {...}). Thanks to ui-tooling-transpile, we can use modern module syntax, now. But when I'm using the transpiler, the string replacer don't work correctly.
I'm using ui5-tooling-transpile version 3.4.1 and ui5-tooling-stringreplace version 3.2.2. and ui5/cli version 3.10.3
My ui5.yaml:
When ui5-tooling-transpiler is used, all .js files are ignored by the string replacer. When the string replacer runs after the transpiler, all .js files getting string replaced correctly, but then the transpiler could not transpile correctly because he transpiled with the placeholders string.
Expected behavior The string replacer don't ignore the *.js files and replace all placesholders before the files getting transpiled. The result should look like the last screenshot, here.
Screenshots When the string replacer runs before the transpiler (*.js files are ignored by the string replacer):![image](https://github.com/ui5-community/ui5-ecosystem-showcase/assets/28623783/b81eac32-a0c3-45ad-8406-b3aecbbe4244)
When the string replacer runs after the transpiler:![image](https://github.com/ui5-community/ui5-ecosystem-showcase/assets/28623783/4e0df229-6eb6-412a-a007-3b5ef6ba2d1c)
When I remove the string replacer and replace all placesholders with the correct namespace, the transpiler works fine (expected behavior):![image](https://github.com/ui5-community/ui5-ecosystem-showcase/assets/28623783/12d47c22-2c43-4d13-bc02-8a660b39a5b5)
Desktop (please complete the following information):