Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export default defineConfig({
},
fmt: {},
lint: { options: { typeAware: true, typeCheck: true } },
run: {
cache: true,
},
});

> test ! -f vite-plus-monorepo/apps/website/vite.config.ts # sub-app should NOT have typeAware/typeCheck
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ignoredPlatforms": ["darwin", "win32", { "os": "linux", "libc": "musl" }],
"ignoredPlatforms": ["win32", { "os": "linux", "libc": "musl" }],
"commands": [
{
"command": "vp create vite:application --no-interactive # create standalone app",
Expand Down
14 changes: 14 additions & 0 deletions packages/cli/snap-tests-global/new-vite-monorepo/snap.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,20 @@ vite.config.ts
"packageManager": "pnpm@<semver>"
}

> cat vite-plus-monorepo/vite.config.ts # check vite config has cache enabled
import { defineConfig } from "vite-plus";

export default defineConfig({
staged: {
"*": "vp check --fix",
},
fmt: {},
lint: { options: { typeAware: true, typeCheck: true } },
run: {
cache: true,
},
});

> cat vite-plus-monorepo/pnpm-workspace.yaml # check workspace config
packages:
- apps/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
},
"ls vite-plus-monorepo | LC_ALL=C sort # check files created",
"cat vite-plus-monorepo/package.json # check package.json",
"cat vite-plus-monorepo/vite.config.ts # check vite config has cache enabled",
"cat vite-plus-monorepo/pnpm-workspace.yaml # check workspace config",
"test -d vite-plus-monorepo/.git && echo 'Git initialized' || echo 'No git' # check git init",
"ls vite-plus-monorepo/apps # check apps directory created",
Expand Down
8 changes: 6 additions & 2 deletions packages/cli/templates/monorepo/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { defineConfig } from 'vite';
import { defineConfig } from 'vite-plus';

export default defineConfig({});
export default defineConfig({
run: {
cache: true,
},
});
Loading