Hello <@U33H6SB2B>, in our project we've developed...
# javascript
d
Hello @turansky, in our project we've developed an extensive SPA with React. Since the size of the JS file has now grown to over 3.8 MB, I'm trying to optimize this with lazy loading. Based on the example from the wrapper project, I'm trying to implement this with the plugin io.github.turansky.seskar (4.7.0) and Suspense + @Lazy in the project. However, I'm getting the following error message:
Copy code
Execution failed for task ':gui:jsProductionGenerateLazyModules'.
> Could not copy file 'C:\projektdateien\avh\portalng\client\gui\build\compileSync\js\main\productionExecutable\kotlin\portalng-vorabanfrageGui\seiten\Vorabanfrage__lazy__module.mjs' to 'C:\projektdateien\avh\portalng\client\gui\build\tmp\jsProductionGenerateLazyModules\portalng-vorabanfrageGui\seiten\Vorabanfrage__lazy__module.mjs'.
   > Error - Invalid filter specification for seskar.gradle.plugin.LazyModuleReader
Besides the plugin, target = "es2015" is set and in the gradle.properties kotlin.js.ir.output.granularity=per-file. Did I forget to configure something?
t
Could you, please, create Seskar-issue with small reproducer?
d
While creating a streamlined version for the ticket, I discovered my mistake. In the file with the Lazy component, there were also additional classes, functions, and enums. When I remove these, an extra module is created.
👍 1