diff --git a/.gitignore b/.gitignore index d98b9c0..2a6e9a8 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ lerna-debug.log* node_modules dist +site dist-ssr *.local diff --git a/.npmignore b/.npmignore index 5223299..0826ad4 100644 --- a/.npmignore +++ b/.npmignore @@ -10,6 +10,7 @@ lerna-debug.log* node_modules dist-ssr +site *.local # Editor directories and files diff --git a/package.json b/package.json index 39a20eb..11012c7 100644 --- a/package.json +++ b/package.json @@ -17,9 +17,9 @@ }, "scripts": { "dev": "vite", - "build": "vite build && vue-tsc --emitDeclarationOnly --project tsconfig.dist.json && mv dist/lib dist/types && rm -rf dist/favicon.ico", + "build": "vite build && vue-tsc --emitDeclarationOnly --project tsconfig.dist.json && mv dist/lib dist/types", "build:site": "vue-tsc --noEmit --project tsconfig.site.json && vite --config vite.site.config.ts build", - "preview": "vite preview", + "preview": "vite preview --config vite.site.config.ts", "lint": "yarn prettier --write '**/*.{ts,vue,json}'" }, "types": "./dist/types/main.d.ts", diff --git a/vite.config.ts b/vite.config.ts index 7dfb2b8..52e7b39 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,6 +4,7 @@ import * as path from "path"; // https://vitejs.dev/config/ export default defineConfig({ + publicDir: false, plugins: [vue()], resolve: { dedupe: ["vue"], diff --git a/vite.site.config.ts b/vite.site.config.ts index 0a8bd80..383104a 100644 --- a/vite.site.config.ts +++ b/vite.site.config.ts @@ -4,4 +4,10 @@ import vue from "@vitejs/plugin-vue"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], + build: { + outDir: "site", + }, + preview: { + port: 3000, + }, });