Commit graph

5 commits

Author SHA1 Message Date
matthewp
f6f01a7d7b [ci] npm run format 2021-04-19 20:14:27 +00:00
Matthew Phillips
cc1a318c41
Fix building of dynamic Svelte components (#115)
Svelte component resolution wasn't handled correctly during the build.

Note that in the future we need to consolidate a "framework" API, so this stuff is not sprinkled throughout the codebase.
2021-04-19 16:13:53 -04:00
Drew Powers
034674c88c
Add Windows Support (#93)
* Add Windows to test suite

* Try implicit URL
2021-04-14 13:21:25 -06:00
duncanhealy
687ff5bacd
chore fix lint reduce errors generated (#83)
* add dep domhandler imported in in src/build/static

* lint and jsDoc error

* move domhandler to devDep

* chore: add package lock

* escape string jsDoc

* chore: add astro dep in until prism import is refactored

* chore: add snowpack example package lock
2021-04-12 16:20:58 +01:00
Matthew Phillips
d9084ff4ad
Implement fallback capability (#44)
* Implement fallback capability

This makes it possible for a dynamic component to render fallback content on the server.

The mechanism is a special `static` prop passed to the component. If `static` is true then the component knows it can render static content.

Putting aside the word `static`, is this the right approach? I think giving components the flexibility to make the decision themselves *is* the right approach.

However in this case we have a special property that is passed in non-explicitly. I think we have to do it this way because if the caller passes in a prop it will get serialized and appear on the client. By making this something we *add* during rendering, it only happens on the server (and only when using `:load`).

Assuming this is the right approach, is `static` the right name for this prop? Other candidates:

* `server`

That's all I have!

* Use `import.meta.env.astro` to tell if running in SSR mode.

* Run formatter
2021-03-31 16:10:27 -04:00