Add support for self hosted 3rd party assets in Vite integration
We have 4 modules that create either <iframe>
or a Web Worker:
- Gitlab's Web IDE
- PDF.js
- Sourcegraph
- Visual review toolbar
All of them rely on this pattern in order to work:
- Use Webpack Dev server to serve the dependency files
-
Copy these files to
/public/assets/webpack
during production build so it works without Webpack dev server
This technique is coupled with Webpack and doesn't work for Vite, so we must find a way to make it work for Vite as well.
Edited by Stanislav Lashmanov