-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
228 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
client-analyze: | ||
@echo "Analyzing client code..." | ||
@yarn run vite build src/client --config analyze.config.ts | ||
awk '{ print }' dist/client/stats.json > src/client/data.json | ||
|
||
build-all: build-server build-client | ||
|
||
build-client: | ||
@echo "Building client code..." | ||
@yarn run vite build src/client | ||
|
||
build-server: | ||
@echo "Building server code..." | ||
@yarn run rollup --config rollup.config.ts --configPlugin swc3 | ||
|
||
dev-server: | ||
@echo "Starting server in development mode..." | ||
@yarn run rollup --config rollup.config.ts --configPlugin swc3 --watch | ||
|
||
dev-client: | ||
@echo "Starting client in development mode..." | ||
@yarn run vite src/client | ||
|
||
test: | ||
@echo "Running tests..." | ||
@yarn run test | ||
|
||
lint: | ||
@echo "Linting code..." | ||
@yarn run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { defineConfig, mergeConfig } from 'vite' | ||
import { analyzer } from './src/server' | ||
import conf from './src/client/vite.config' | ||
|
||
const c = conf({ command: 'build', mode: 'production' }) | ||
export default mergeConfig(c, defineConfig({ | ||
plugins: [...c.plugins!, analyzer({ analyzerMode: 'json' })] | ||
})) |
Oops, something went wrong.