@theholocron/vite-config 7.1.0 → 7.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -0
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -56,3 +56,23 @@ import { nodeApp } from "@theholocron/vite-config/node-app";
|
|
|
56
56
|
|
|
57
57
|
export default defineConfig(await nodeApp({ entry: "src/index.ts" }));
|
|
58
58
|
```
|
|
59
|
+
|
|
60
|
+
## Codecov bundle analysis
|
|
61
|
+
|
|
62
|
+
All three presets automatically include [`@codecov/vite-plugin`](https://www.npmjs.com/package/@codecov/vite-plugin) when `@codecov/vite-plugin` is installed and `CODECOV_TOKEN` is set in the environment. No extra configuration in `vite.config.ts` is needed — bundle stats are uploaded to Codecov on every build.
|
|
63
|
+
|
|
64
|
+
Install the peer dependency:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm install --save-dev @codecov/vite-plugin
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Set `CODECOV_TOKEN` as a CI secret, then add the following to your `codecov.yml` to control when Codecov posts bundle size comments on PRs:
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
comment:
|
|
74
|
+
require_bundle_changes: true
|
|
75
|
+
bundle_change_threshold: "1Kb"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
This posts a comment only when bundle size changes by more than 1 KB — enough to flag meaningful regressions without noise from routine fluctuations. See the [Codecov bundle analysis docs](https://docs.codecov.com/docs/javascript-bundle-analysis) for more threshold options.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/vite-config",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.2",
|
|
4
4
|
"description": "Vite configuration presets for libraries, React apps, and Node tools within the Galaxy.",
|
|
5
5
|
"homepage": "https://github.com/theholocron/configs/tree/main/packages/vite-config#readme",
|
|
6
6
|
"bugs": "https://github.com/theholocron/configs/issues",
|
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
"tsdown": "^0.22.8",
|
|
24
24
|
"typescript": "^5.9.3",
|
|
25
25
|
"vitest": "^4.0.0",
|
|
26
|
-
"vite": "^
|
|
27
|
-
"@
|
|
28
|
-
"@theholocron/
|
|
26
|
+
"vite": "^7.0.0",
|
|
27
|
+
"@codecov/vite-plugin": "^2.0.0",
|
|
28
|
+
"@theholocron/tsconfig": "7.1.2",
|
|
29
|
+
"@theholocron/vitest-config": "7.1.2"
|
|
29
30
|
},
|
|
30
31
|
"exports": {
|
|
31
32
|
".": {
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
"dist/"
|
|
55
56
|
],
|
|
56
57
|
"peerDependencies": {
|
|
57
|
-
"vite": "^6",
|
|
58
|
+
"vite": "^6 || ^7",
|
|
58
59
|
"@codecov/vite-plugin": "^2",
|
|
59
60
|
"@vitejs/plugin-react": "^4",
|
|
60
61
|
"vite-tsconfig-paths": "^5"
|