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

Fix infinite loop when prerendering json imports #480

Merged
merged 4 commits into from
Mar 28, 2021

Conversation

marvinhagemeister
Copy link
Member

@marvinhagemeister marvinhagemeister commented Mar 28, 2021

This bug was a combination of multiple smaller issues:

Fixes #446, fixes #474 .

@changeset-bot
Copy link

changeset-bot bot commented Mar 28, 2021

🦋 Changeset detected

Latest commit: 8320de5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wmr Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 28, 2021

Size Change: +1.27 kB (0%)

Total Size: 694 kB

Filename Size Change
examples/demo/dist/about/index.html 668 B +10 B (+2%)
examples/demo/dist/chunks/class-fields.********.js 201 B -1 B (0%)
examples/demo/dist/chunks/compat.********.js 15.3 kB -2 B (0%)
examples/demo/dist/chunks/prerender.********.js 2.41 kB -1 B (0%)
examples/demo/dist/class-fields/index.html 647 B +11 B (+2%)
examples/demo/dist/compat/index.html 1.5 kB +10 B (+1%)
examples/demo/dist/env/index.html 724 B +12 B (+2%)
examples/demo/dist/error/index.html 657 B +11 B (+2%)
examples/demo/dist/files/index.html 688 B +11 B (+2%)
examples/demo/dist/index.********.js 7.23 kB +42 B (+1%)
examples/demo/dist/index.html 715 B +12 B (+2%)
examples/demo/dist/lazy-and-late/index.html 669 B +11 B (+2%)
packages/wmr/wmr.cjs 661 kB +237 B (0%)
examples/demo/dist/chunks/json.********.js 237 B +237 B (new file) 🆕
examples/demo/dist/json/index.html 667 B +667 B (new file) 🆕
ℹ️ View Unchanged
Filename Size Change
examples/demo/dist/assets/Calendar.********.css 702 B 0 B
examples/demo/dist/assets/style.********.css 386 B 0 B
examples/demo/dist/chunks/index.********.js 303 B 0 B

compressed-size-action

Copy link
Member

@developit developit left a comment

Choose a reason for hiding this comment

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

That was quite the saga, haha.

@danielweck
Copy link

If I am not mistaken, this PR supersedes #458 ?

const [fetched, setFetched] = useState(null);

useEffect(() => {
fetch('./pages/foo.json')

Choose a reason for hiding this comment

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

Just a thought: this feels like a missed opportunity to demonstrate import jsonUrl from 'url:./foo.json'; + fetch(jsonUrl). Otherwise, to the reader the relative path ./pages/foo.json looks like "magic", in the base context of public/pages/json.js.

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.

JSON import plugin is broken (infinite loop in production build, blank page in dev mode)
3 participants