Skip to content

refactor(scripts): use parent to fetch config in entrypoint#909

Merged
RomanYarik merged 4 commits intomasterfrom
roman/parent-configs
Aug 24, 2021
Merged

refactor(scripts): use parent to fetch config in entrypoint#909
RomanYarik merged 4 commits intomasterfrom
roman/parent-configs

Conversation

@RomanYarik
Copy link
Copy Markdown
Contributor

Currently each iframe environment fetches the config for itself.

We've seen that if an iframe wishes to load from a source which is not in the same base host as the parent, it cannot fetch the configurations properly.

Using parent window for 2 purpuses:

  1. fetch the configuration for each new child environment
  2. cache results, so we will avoid unneeded cache

Ideally, this should be solved using some middle service which manages that for all the browser environments (maybe a service worker), but it requires extra research

Comment thread packages/scripts/src/create-entrypoint.ts
Comment thread packages/scripts/src/create-entrypoint.ts
@tomermes tomermes self-requested a review August 23, 2021 14:47
Copy link
Copy Markdown
Contributor

@tomermes tomermes left a comment

Choose a reason for hiding this comment

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

Solved the issue with the full app (1 out of 3 "replaces")

@RomanYarik RomanYarik merged commit 9a1cb65 into master Aug 24, 2021
@RomanYarik RomanYarik deleted the roman/parent-configs branch August 24, 2021 08:01
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.

4 participants