diff options
author | 2021-12-30 09:01:00 -0500 | |
---|---|---|
committer | 2021-12-30 09:01:00 -0500 | |
commit | ae5255dd25e36da2ce03f515af7b8f1ec6fcac91 (patch) | |
tree | abbf33ef08438c351f558514f4ce1dc7740c394d /examples/fast-build/src/components | |
parent | 8b34bd90f8b967942ef5d0f0d50e9f9e52cdbe10 (diff) | |
download | astro-ae5255dd25e36da2ce03f515af7b8f1ec6fcac91.tar.gz astro-ae5255dd25e36da2ce03f515af7b8f1ec6fcac91.tar.zst astro-ae5255dd25e36da2ce03f515af7b8f1ec6fcac91.zip |
Implement hydrated components in the static build (#2260)
* Work on removing vite-postprocess
* Gets hydration totally working
* Formatting
* Update based on PR comments
* Bring back vite transform for non-static builds
* Upgrade compiler version
* Update the client-only test
* Add debugging for windows
* More debugging
* Pass pathname into the markdown plugin as well
* Include vite changes
* Revert "Include vite changes"
This reverts commit dee6348b233b6d6c6fea1e4dcc41c98c0452846c.
Diffstat (limited to 'examples/fast-build/src/components')
-rw-r--r-- | examples/fast-build/src/components/Counter.vue | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/fast-build/src/components/Counter.vue b/examples/fast-build/src/components/Counter.vue new file mode 100644 index 000000000..599bcf615 --- /dev/null +++ b/examples/fast-build/src/components/Counter.vue @@ -0,0 +1,24 @@ +<template> + <div id="vue" class="counter"> + <button @click="subtract()">-</button> + <pre>{{ count }}</pre> + <button @click="add()">+</button> + </div> +</template> + +<script> +import { ref } from 'vue'; +export default { + setup() { + const count = ref(0); + const add = () => (count.value = count.value + 1); + const subtract = () => (count.value = count.value - 1); + + return { + count, + add, + subtract, + }; + }, +}; +</script> |