Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Make Theia webpack-based bundle packaging customizable #1065

Closed
davidfestal opened this issue Nov 14, 2018 · 4 comments
Closed

Make Theia webpack-based bundle packaging customizable #1065

davidfestal opened this issue Nov 14, 2018 · 4 comments
Assignees

Comments

@davidfestal
Copy link
Member

davidfestal commented Nov 14, 2018

Currently, the Theia webpack configuration file, as well as the main HTML file that loads the packaged JS bundle file, are generated during Theia build.

In order to provide enable bundle caching in a way that can be customized by the theia distributrion packager, we should introduce a way to customize:

  • the webpack configuration, at least providing an option to enable a typical caching-compatible configuration (see https://webpack.js.org/guides/caching/)
  • the generated HTML using the HtmlWebpackPlugin, in order to let the user provide its own template during the theia build call, as well as additional html template parameters through command line arguments.

The result of this work should be to have the related PR merged in the upstream Theia repository.

@davidfestal
Copy link
Member Author

The following PR has been opened in the Theia repository: eclipse-theia/theia#3522

@davidfestal
Copy link
Member Author

Let me comment about the current status of tth issue:

Finally fhe work done on CDNs on che-theia (see branch https://github.com/eclipse/che/compare/theia-cdn-support) was done without requiring any change in Theia upstream, by using:

  1. a custom Webpack configuration that imports the default generated Theia webpack configuration and introduces CDN-related optimizations / changes
  2. a custom HTML template used in the custom webpack configuration. For now this custom HTML template duplicates a bit the content of the default theia generated HTML,
  3. a custom JS file overrides the vs/loader.js monaco requireJS loader, in order to override the requireJS configuration.

Through it currently works well, I propose to keep this issue opened to track what parts of this work we would be able to propose in Theia upstream, or what change in Theia upstream would make our CDN work cleaner / easier to maintain, especially for the HTML template part (to avoid future syncs of duplicated code) and the vsCode requireJS overriding, which requires renaming files in the generated webpack package.

However, I think we can decrease the priority of this issue, and possibly wait for the CDN support to be used a while, and finalized. When it has reached its final shape, this issue will come back.

@ibuziuk @benoitf do you agree ?

@ibuziuk
Copy link
Member

ibuziuk commented Dec 5, 2018

I agree, let's postpone it in favour of #1119

@ibuziuk
Copy link
Member

ibuziuk commented Oct 19, 2020

Closing as outdated

@ibuziuk ibuziuk closed this as completed Oct 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants