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

Custom rpc templates #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

noreiller
Copy link
Contributor

Hello, considering the issue that @ScriptedAlchemy raised, I propose to pass optional custom templates.

I also propose to isolate rpc functions and make them more straightforward with the minimum of logic (such as the arguments parsing).

Copy link
Owner

@telenko telenko left a comment

Choose a reason for hiding this comment

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

Hey, sorry for late code review, I was too busy with other things. Let me know if you have some questions/proposals/ideas :)

@@ -71,14 +52,23 @@ class NodeModuleFederation {
}

apply(compiler) {
const { getRemoteUri, ...options } = this.options;
const {
customRpcLoadTemplate,
Copy link
Owner

Choose a reason for hiding this comment

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

since you're adding new options - please document them.

}
//TODO https support
let request = (url.startsWith('https') ? require('https') : require('http')).get(url, function(resp) {
if (resp.statusCode === 200) {
Copy link
Owner

Choose a reason for hiding this comment

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

This template should reuse rpcLoad template to avoid duplicates

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.

2 participants