import { defineConfig } from 'vite'
-console.log('loaded config')
-
export default defineConfig({
define: {
__DEV__: 'true',
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>🍍 Pinia playground</title>
+ </head>
+ <body>
+ <div id="app"></div>
+ <script type="module" src="/playground/src/main.ts"></script>
+ </body>
+</html>
"@types/node": "^16.0.1",
"@vue/server-renderer": "^3.1.5",
"@vue/test-utils": "^2.0.0-rc.10",
+ "@vitejs/plugin-vue": "^1.2.4",
+ "@vue/compiler-sfc": "npm:@knightly/vue__compiler-sfc@3-2",
"@vueuse/core": "^5.1.3",
"brotli": "^1.3.2",
"codecov": "^3.8.2",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.30.0",
"typescript": "~4.3.5",
+ "vite": "^2.4.1",
"vitepress": "^0.15.6",
"vue": "^3.1.5",
"yorkie": "^2.0.0"
--- /dev/null
+node_modules
+.DS_Store
+dist
+dist-ssr
+*.local
--- /dev/null
+<template>
+ <TestStore />
+</template>
+
+<script lang="ts" setup>
+import TestStore from './components/TestStore.vue'
+</script>
+
+<style>
+#app {
+ font-family: Avenir, Helvetica, Arial, sans-serif;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+ text-align: center;
+ color: #2c3e50;
+ margin-top: 60px;
+}
+</style>
<div>
<p>Counter: {{ counterStore.double }} = 2 x {{ counterStore.n }}</p>
<button @click="counterStore.increment(10)">Increment</button>
- <button @click="counterStore.fail">Fail</button>
+ <button @click="counterStore.fail()">Fail</button>
<button @click="counterStore.decrementToZero(300)">Countdown!</button>
</div>
</template>
--- /dev/null
+import { createApp } from 'vue'
+import App from './App.vue'
+import { createPinia } from '../../src'
+
+createApp(App).use(createPinia()).mount('#app')
--- /dev/null
+declare module '*.vue' {
+ import { DefineComponent } from 'vue'
+ const component: DefineComponent<{}, {}, any>
+ export default component
+}
--- /dev/null
+/// <reference types="vite/client" />
--- /dev/null
+import { defineConfig } from 'vite'
+import vue from '@vitejs/plugin-vue'
+
+// https://vitejs.dev/config/
+export default defineConfig({
+ plugins: [vue()],
+ define: {
+ __DEV__: 'true',
+ __BROWSER__: 'true',
+ __TEST__: 'false',
+ },
+ optimizeDeps: {
+ exclude: ['@vueuse/shared', '@vueuse/core'],
+ },
+})
dependencies:
"@types/yargs-parser" "*"
-"@vitejs/plugin-vue@^1.2.3":
+"@vitejs/plugin-vue@^1.2.3", "@vitejs/plugin-vue@^1.2.4":
version "1.2.4"
resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-1.2.4.tgz#a7aa6e6a31c556a8b781de730316deeecf7f56f2"
integrity sha512-D/3H9plevPQGgQGwmV6eecvOnooLTecPR63HPffVVWPEhbfvmtYLWgznzs456NBb2DItiRTCIa1yWxvGqC+I8A==
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
-vite@^2.3.7:
+vite@^2.3.7, vite@^2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.4.1.tgz#2e48b8dbfc69e4edbf7f4d1c0798d621585cb8da"
integrity sha512-4BpKRis9uxIqPfIEcJ18LTBsamqnDFxTx45CXwagHjNltHa6PFEvf8Pe6OpgIHb0OyWT30OXOSSQvdOaX4OBiQ==