Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use webpack to replace shell script and simplify the logic #412

Merged
merged 9 commits into from
May 31, 2022

Conversation

xcv58
Copy link
Collaborator

@xcv58 xcv58 commented May 29, 2022

Move the shell scripts to webpack config. So that we can enable multiple things in following PR:

  1. Generate the HTML file to avoid duplication: feat: support for npm #410 (comment)
  2. Convert the project to yarn workspaces and add Turborepo support https://turborepo.org/
  3. Remove the custom hash function and use webpack to generate the assets injects so it has builtin hash

@vercel
Copy link

vercel bot commented May 29, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
github1s ✅ Ready (Inspect) Visit Preview May 31, 2022 at 7:17AM (UTC)

@xcv58 xcv58 marked this pull request as ready for review May 29, 2022 03:48
@xcv58 xcv58 changed the title Use webpack to replace shell script and simplify the logic [PLEASE DO NOT REVIEW, WIP] Use webpack to replace shell script and simplify the logic May 29, 2022
@xcv58
Copy link
Collaborator Author

xcv58 commented May 29, 2022

@conwnet can you double-check whether the vscodeUnpkgProxyHandler and sourcegraphProxyHandler are still in use? Can we remove it from development mode?

const vscodeUnpkgProxyHandler = (req, res, vscodeUnpkgMatches) => {
const publisher = vscodeUnpkgMatches[1];
const restPartsPath = vscodeUnpkgMatches[2];
const host = `${publisher}.vscode-unpkg.net`.toLowerCase();
const target = `https://${host}/${publisher}/${restPartsPath}`;
const headers = { host };
proxyServer.web(req, res, { target, headers });
};

@conwnet
Copy link
Owner

conwnet commented May 29, 2022

can you double-check whether the vscodeUnpkgProxyHandler and sourcegraphProxyHandler are still in use? Can we remove it from development mode?

The sourcegraphProxyHandler is no longer in use because sourcegraph api supports CORS now.
The vscodeUnpkgProxyHandler is still in use. @xcv58

@Siddhant-K-code Siddhant-K-code marked this pull request as draft May 29, 2022 07:30
@Siddhant-K-code
Copy link
Collaborator

yeah @xcv58, we can remove sourcegraphProxyHandler part

@xcv58 xcv58 changed the title [PLEASE DO NOT REVIEW, WIP] Use webpack to replace shell script and simplify the logic Use webpack to replace shell script and simplify the logic May 29, 2022
@xcv58 xcv58 marked this pull request as ready for review May 29, 2022 16:38
@xcv58 xcv58 requested a review from conwnet May 30, 2022 02:38
conwnet
conwnet previously approved these changes May 31, 2022
Copy link
Owner

@conwnet conwnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! Thank you so much!

@xcv58 xcv58 merged commit 76469e6 into master May 31, 2022
@xcv58 xcv58 deleted the update-scripts branch May 31, 2022 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants