Skip to content

Commit

Permalink
build: add rollup-plugin-visualizer
Browse files Browse the repository at this point in the history
  • Loading branch information
velut committed Aug 21, 2024
1 parent 477d678 commit 54d75fe
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ pnpm-debug.log*

# Vitest coverage
coverage/

# rollup-plugin-visualizer
stats.html
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ yarn.lock

# Ignore old code
/old

# rollup-plugin-visualizer
stats.html
3 changes: 2 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import vercel from "@astrojs/vercel/serverless";
import { defineConfig } from "astro/config";
import { execSync } from "node:child_process";
import process from "node:process";
import { visualizer } from "rollup-plugin-visualizer";
import Icons from "unplugin-icons/vite";

// https://astro.build/config
Expand All @@ -21,7 +22,7 @@ export default defineConfig({
: node({ mode: "standalone" }),
integrations: [alpinejs({ entrypoint: "/src/scripts/alpine" }), tailwind()],
vite: {
plugins: [Icons({ compiler: "astro" })],
plugins: [Icons({ compiler: "astro" }), visualizer()],
define: {
_GIT_COMMIT: JSON.stringify(execSync("git rev-parse HEAD").toString().trim()),
},
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-tailwindcss": "^0.6.6",
"rollup-plugin-visualizer": "^5.12.0",
"tailwindcss": "^3.4.10",
"tempy": "^3.1.0",
"typescript": "^5.5.4",
Expand Down
59 changes: 59 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 54d75fe

Please sign in to comment.