Conversation
Bringing this back on track... all tests now passing except the ones relating to |
src/core/create_manifest_data.ts
Outdated
|
||
if (/preload/.test(source)) { | ||
try { | ||
const { stats } = svelte.compile(source, { generate: false }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use an empty warning handler here to suppress the display of any warnings while we're determining whether there's a preload. They'll be getting displayed during the main compilation anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch — added locally
There are some failing tests related to rollup/rollup#2677, but I think this is probably good to merge into master — I'm not anticipating a new release before Svelte 3 is ready. This PR incorporates the ideas in #546, #551, #552 and #554. |
This doesn't represent much work — basically the minimum required to get an app working. A particular annoyance is that we can no longer check for the existence of
Component.preload
, because in Svelte 3 things likepreload
are separate named imports:Rollup doesn't like that — it chokes when you try to import a name that the module doesn't export. We have to jump through some unpleasant hoops to get it to work, and even then it gives us a bunch of warnings. The solution, I think, is to precompile page/layout components so that we can see which ones have
preload
, and add the imports more selectively.Anyway, I'll release an alpha version so that I can deploy the new (also very WIP) site.