├── .github └── workflows │ ├── ci.yml │ ├── pkg-pr-new.yml │ └── release.yml ├── .gitignore ├── .vscode └── settings.json ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── bin └── vite-ssg.js ├── eslint.config.js ├── examples ├── README.md ├── multiple-pages-pwa │ ├── index.html │ ├── package.json │ ├── src │ │ ├── App.vue │ │ ├── main.ts │ │ └── pages │ │ │ ├── b.vue │ │ │ ├── index.vue │ │ │ └── nested │ │ │ └── deep │ │ │ └── a.vue │ ├── tsconfig.json │ └── vite.config.ts ├── multiple-pages-with-store │ ├── index.html │ ├── package.json │ ├── src │ │ ├── App.vue │ │ ├── assets │ │ │ └── test.jpg │ │ ├── components │ │ │ ├── Counter.vue │ │ │ └── MousePos.vue │ │ ├── main.ts │ │ ├── pages │ │ │ ├── a.md │ │ │ ├── b.vue │ │ │ ├── index.md │ │ │ └── nested │ │ │ │ └── deep │ │ │ │ └── b.md │ │ └── store │ │ │ └── root.ts │ ├── tsconfig.json │ └── vite.config.ts ├── multiple-pages │ ├── .env │ ├── .env.ssg │ ├── index.html │ ├── package.json │ ├── src │ │ ├── App.vue │ │ ├── assets │ │ │ └── test.jpg │ │ ├── components │ │ │ ├── Counter.vue │ │ │ └── MousePos.vue │ │ ├── entry.ts │ │ └── pages │ │ │ ├── a.md │ │ │ ├── b.vue │ │ │ ├── index.md │ │ │ └── nested │ │ │ └── deep │ │ │ └── b.md │ ├── tsconfig.json │ ├── vite.config.ts │ └── vue-shim.d.ts └── single-page │ ├── index.html │ ├── package.json │ ├── src │ ├── App.vue │ ├── main.ts │ └── store │ │ └── root.ts │ ├── tsconfig.json │ ├── vite.config.ts │ └── vue-shim.d.ts ├── package.json ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── scripts └── copy-readme-files.ts ├── src ├── client │ ├── components │ │ └── ClientOnly.ts │ ├── index.ts │ └── single-page.ts ├── index.ts ├── node.ts ├── node │ ├── build.ts │ ├── cli.ts │ ├── critical.ts │ ├── index.ts │ ├── jsdomGlobal.mjs │ ├── preload-links.ts │ └── utils.ts ├── types.ts └── utils │ ├── document-ready.ts │ └── state.ts ├── test └── asset.test.ts └── tsconfig.json /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.github/workflows/pkg-pr-new.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/.github/workflows/pkg-pr-new.yml -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/.github/workflows/release.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/.gitignore -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/.vscode/settings.json -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Please refer to https://github.com/antfu/contribute 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/README.md -------------------------------------------------------------------------------- /bin/vite-ssg.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/bin/vite-ssg.js -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/eslint.config.js -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/README.md -------------------------------------------------------------------------------- /examples/multiple-pages-pwa/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-pwa/index.html -------------------------------------------------------------------------------- /examples/multiple-pages-pwa/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-pwa/package.json -------------------------------------------------------------------------------- /examples/multiple-pages-pwa/src/App.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-pwa/src/App.vue -------------------------------------------------------------------------------- /examples/multiple-pages-pwa/src/main.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-pwa/src/main.ts -------------------------------------------------------------------------------- /examples/multiple-pages-pwa/src/pages/b.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-pwa/src/pages/b.vue -------------------------------------------------------------------------------- /examples/multiple-pages-pwa/src/pages/index.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-pwa/src/pages/index.vue -------------------------------------------------------------------------------- /examples/multiple-pages-pwa/src/pages/nested/deep/a.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-pwa/src/pages/nested/deep/a.vue -------------------------------------------------------------------------------- /examples/multiple-pages-pwa/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-pwa/tsconfig.json -------------------------------------------------------------------------------- /examples/multiple-pages-pwa/vite.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-pwa/vite.config.ts -------------------------------------------------------------------------------- /examples/multiple-pages-with-store/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-with-store/index.html -------------------------------------------------------------------------------- /examples/multiple-pages-with-store/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-with-store/package.json -------------------------------------------------------------------------------- /examples/multiple-pages-with-store/src/App.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-with-store/src/App.vue -------------------------------------------------------------------------------- /examples/multiple-pages-with-store/src/assets/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-with-store/src/assets/test.jpg -------------------------------------------------------------------------------- /examples/multiple-pages-with-store/src/components/Counter.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-with-store/src/components/Counter.vue -------------------------------------------------------------------------------- /examples/multiple-pages-with-store/src/components/MousePos.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-with-store/src/components/MousePos.vue -------------------------------------------------------------------------------- /examples/multiple-pages-with-store/src/main.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-with-store/src/main.ts -------------------------------------------------------------------------------- /examples/multiple-pages-with-store/src/pages/a.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-with-store/src/pages/a.md -------------------------------------------------------------------------------- /examples/multiple-pages-with-store/src/pages/b.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-with-store/src/pages/b.vue -------------------------------------------------------------------------------- /examples/multiple-pages-with-store/src/pages/index.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-with-store/src/pages/index.md -------------------------------------------------------------------------------- /examples/multiple-pages-with-store/src/pages/nested/deep/b.md: -------------------------------------------------------------------------------- 1 | # Page B 2 | -------------------------------------------------------------------------------- /examples/multiple-pages-with-store/src/store/root.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-with-store/src/store/root.ts -------------------------------------------------------------------------------- /examples/multiple-pages-with-store/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-with-store/tsconfig.json -------------------------------------------------------------------------------- /examples/multiple-pages-with-store/vite.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages-with-store/vite.config.ts -------------------------------------------------------------------------------- /examples/multiple-pages/.env: -------------------------------------------------------------------------------- 1 | VITE_ENV_MODE=default -------------------------------------------------------------------------------- /examples/multiple-pages/.env.ssg: -------------------------------------------------------------------------------- 1 | VITE_ENV_MODE=ssg -------------------------------------------------------------------------------- /examples/multiple-pages/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages/index.html -------------------------------------------------------------------------------- /examples/multiple-pages/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages/package.json -------------------------------------------------------------------------------- /examples/multiple-pages/src/App.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages/src/App.vue -------------------------------------------------------------------------------- /examples/multiple-pages/src/assets/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages/src/assets/test.jpg -------------------------------------------------------------------------------- /examples/multiple-pages/src/components/Counter.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages/src/components/Counter.vue -------------------------------------------------------------------------------- /examples/multiple-pages/src/components/MousePos.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages/src/components/MousePos.vue -------------------------------------------------------------------------------- /examples/multiple-pages/src/entry.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages/src/entry.ts -------------------------------------------------------------------------------- /examples/multiple-pages/src/pages/a.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages/src/pages/a.md -------------------------------------------------------------------------------- /examples/multiple-pages/src/pages/b.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages/src/pages/b.vue -------------------------------------------------------------------------------- /examples/multiple-pages/src/pages/index.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages/src/pages/index.md -------------------------------------------------------------------------------- /examples/multiple-pages/src/pages/nested/deep/b.md: -------------------------------------------------------------------------------- 1 | # Page B 2 | -------------------------------------------------------------------------------- /examples/multiple-pages/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages/tsconfig.json -------------------------------------------------------------------------------- /examples/multiple-pages/vite.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages/vite.config.ts -------------------------------------------------------------------------------- /examples/multiple-pages/vue-shim.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/multiple-pages/vue-shim.d.ts -------------------------------------------------------------------------------- /examples/single-page/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/single-page/index.html -------------------------------------------------------------------------------- /examples/single-page/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/single-page/package.json -------------------------------------------------------------------------------- /examples/single-page/src/App.vue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/single-page/src/App.vue -------------------------------------------------------------------------------- /examples/single-page/src/main.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/single-page/src/main.ts -------------------------------------------------------------------------------- /examples/single-page/src/store/root.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/single-page/src/store/root.ts -------------------------------------------------------------------------------- /examples/single-page/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/single-page/tsconfig.json -------------------------------------------------------------------------------- /examples/single-page/vite.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/single-page/vite.config.ts -------------------------------------------------------------------------------- /examples/single-page/vue-shim.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/examples/single-page/vue-shim.d.ts -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/package.json -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/pnpm-lock.yaml -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/pnpm-workspace.yaml -------------------------------------------------------------------------------- /scripts/copy-readme-files.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/scripts/copy-readme-files.ts -------------------------------------------------------------------------------- /src/client/components/ClientOnly.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/src/client/components/ClientOnly.ts -------------------------------------------------------------------------------- /src/client/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/src/client/index.ts -------------------------------------------------------------------------------- /src/client/single-page.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/src/client/single-page.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './client' 2 | -------------------------------------------------------------------------------- /src/node.ts: -------------------------------------------------------------------------------- 1 | export * from './node/index' 2 | -------------------------------------------------------------------------------- /src/node/build.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/src/node/build.ts -------------------------------------------------------------------------------- /src/node/cli.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/src/node/cli.ts -------------------------------------------------------------------------------- /src/node/critical.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/src/node/critical.ts -------------------------------------------------------------------------------- /src/node/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/src/node/index.ts -------------------------------------------------------------------------------- /src/node/jsdomGlobal.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/src/node/jsdomGlobal.mjs -------------------------------------------------------------------------------- /src/node/preload-links.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/src/node/preload-links.ts -------------------------------------------------------------------------------- /src/node/utils.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/src/node/utils.ts -------------------------------------------------------------------------------- /src/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/src/types.ts -------------------------------------------------------------------------------- /src/utils/document-ready.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/src/utils/document-ready.ts -------------------------------------------------------------------------------- /src/utils/state.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/src/utils/state.ts -------------------------------------------------------------------------------- /test/asset.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/test/asset.test.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/antfu-collective/vite-ssg/HEAD/tsconfig.json --------------------------------------------------------------------------------