Prevent defaultServeStatic overwrite when serving custom plugin folder to load built-In plugins after deploying the browser-app lib folder on server. #15458
-
Hi everyone, I'm working on a Theia-based application and want to serve plugins from a custom /plugins folder. Everything works fine on localhost, but once I deploy the lib folder to a server, loading from /plugins no longer works. To make it work, I temporarily modified the defaultServeStatic() function in: function defaultServeStatic(app) { ❓ My question: I've already tried adding a server.ts file under src/backend and setting "main": "lib/backend/server.js" in package.json, but I’m not sure if that fully overrides the default backend behavior or if something else is still calling defaultServeStatic() from main.js. Any guidance on the proper way to customize and persist backend static routes in Theia would be greatly appreciated! Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Hey @PragyanandGithub, You can create a new theia/packages/core/src/node/backend-application.ts Lines 78 to 90 in 11d0c9e |
Beta Was this translation helpful? Give feedback.
You can just use
node main.js --plugins=local-dir:../plugins
just as well. The arguments fromtheia start
are directly passed to the server file as is.