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

update snowpack to v3.0 #321

Merged
merged 13 commits into from
Jan 13, 2021
Merged

update snowpack to v3.0 #321

merged 13 commits into from
Jan 13, 2021

Conversation

FredKSchott
Copy link
Contributor

@FredKSchott FredKSchott commented Jan 13, 2021

Before submitting the PR, please make sure you do the following

  • Updated Snowpack & Snowpack Svelte plugin to latest v3.0 (published today, announcement coming tomorrow).
  • Updated code to final v3 interface changes.
  • Lots of bug fixes and improvements, but overall no huge changes to how Snowpack works in this setup. I know @samccone had mentioned our new streaming imports feature, but that is not enabled in Snowpack by default.
  • Question: We've merged in support for your loader as snowpack.getESMRuntime(). LMK if you'd like me to update SvelteKit to use that implementation and get rid of the custom loader.js that you all have here.

Tests

  • Question: Examples are currently failing with a NOT_FOUND error that I can't track down. From the logs, it looks like something server-side is requesting foo.js instead of the new v3.0 foo.svelte.js. I looked around for where that was happening, but couldn't find it. @Rich-Harris And ideas?

@Rich-Harris
Copy link
Member

thank you @FredKSchott! and congrats on 3.0 🎉

as mentioned in FredKSchott/snowpack#2260, I'm slightly unclear on the file renaming rules — another thing that I've noticed is that sometimes component imports become foo.svelte.proxy.js, but that URL doesn't work (it needs to be foo.svelte.js). Currently working around it in the hackiest way possible, but perhaps you have some insight into what's happening there?

@Rich-Harris Rich-Harris merged commit 9b758aa into master Jan 13, 2021
@Rich-Harris Rich-Harris deleted the snowpack-3-update branch January 13, 2021 19:30
@FredKSchott
Copy link
Contributor Author

Hmm, foo.svelte.proxy.js is definitely unexpected. If you can point me to a branch where this is happening (or just what lines to remove on master to fix) then I'm happy to take a look

@Rich-Harris
Copy link
Member

@FredKSchott if you just comment out these lines...

url = url.replace('.svelte.proxy', '.svelte');

req.url = req.url.replace('.svelte.proxy', '.svelte');

...then try to pnpm dev any of the projects in examples, or try pnpm test inside test/apps/basic, you'll see it fail

@FredKSchott
Copy link
Contributor Author

Found the issue: #323

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