diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54f416e..ed69582 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,9 @@ name: Release +permissions: + id-token: write + contents: write + on: push: tags: @@ -9,18 +13,15 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - - name: Install pnpm - uses: pnpm/action-setup@v2 - - - name: Set node - uses: actions/setup-node@v3 + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: lts/* + registry-url: https://registry.npmjs.org/ - - run: npx changelogithub + - run: pnpm dlx changelogithub env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/README.md b/README.md index 65264e1..abd6a3c 100644 --- a/README.md +++ b/README.md @@ -174,14 +174,14 @@ Following [Pinia's guide](https://pinia.esm.dev/ssr), you will to adapt your `ma like this: ```ts -// main.ts -import { ViteSSG } from 'vite-ssg' import { createPinia } from 'pinia' import routes from 'virtual:generated-pages' +// main.ts +import { ViteSSG } from 'vite-ssg' +import App from './App.vue' // use any store you configured that you need data from on start-up import { useRootStore } from './store/root' -import App from './App.vue' export const createApp = ViteSSG( App, @@ -211,9 +211,9 @@ export const createApp = ViteSSG(

```ts +import routes from 'virtual:generated-pages' // main.ts import { ViteSSG } from 'vite-ssg' -import routes from 'virtual:generated-pages' import { createStore } from 'vuex' import App from './App.vue' diff --git a/examples/multiple-pages-pwa/src/main.ts b/examples/multiple-pages-pwa/src/main.ts index 8a81a54..ab77287 100644 --- a/examples/multiple-pages-pwa/src/main.ts +++ b/examples/multiple-pages-pwa/src/main.ts @@ -1,6 +1,6 @@ +import routes from '~pages' import { ViteSSG } from 'vite-ssg' import App from './App.vue' -import routes from '~pages' export const createApp = ViteSSG(App, { base: import.meta.env.BASE_URL, diff --git a/examples/multiple-pages-pwa/vite.config.ts b/examples/multiple-pages-pwa/vite.config.ts index e9c117e..ac3e32b 100644 --- a/examples/multiple-pages-pwa/vite.config.ts +++ b/examples/multiple-pages-pwa/vite.config.ts @@ -1,7 +1,7 @@ import type { UserConfig } from 'vite' +import Vue from '@vitejs/plugin-vue' import Pages from 'vite-plugin-pages' import { VitePWA } from 'vite-plugin-pwa' -import Vue from '@vitejs/plugin-vue' const config: UserConfig = { plugins: [ diff --git a/examples/multiple-pages-with-store/src/main.ts b/examples/multiple-pages-with-store/src/main.ts index 46a0dfd..425610d 100644 --- a/examples/multiple-pages-with-store/src/main.ts +++ b/examples/multiple-pages-with-store/src/main.ts @@ -1,9 +1,9 @@ import devalue from '@nuxt/devalue' -import { ViteSSG } from 'vite-ssg' +import routes from '~pages' import { createPinia } from 'pinia' -import { useRootStore } from './store/root' +import { ViteSSG } from 'vite-ssg' import App from './App.vue' -import routes from '~pages' +import { useRootStore } from './store/root' export const createApp = ViteSSG( App, diff --git a/examples/multiple-pages-with-store/src/pages/b.vue b/examples/multiple-pages-with-store/src/pages/b.vue index f72be50..256dfcc 100644 --- a/examples/multiple-pages-with-store/src/pages/b.vue +++ b/examples/multiple-pages-with-store/src/pages/b.vue @@ -1,6 +1,6 @@