From cdd0f2bef5c522eb6809ba58d7d9adc2eb4bd6b3 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Mon, 30 Sep 2024 15:01:33 +0800 Subject: chore(build): add bundle stat for dev --- .gitignore | 1 + package.json | 1 + rollup.config.js | 2 ++ 3 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 19cd215..81d29f2 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ package-lock.json pnpm-lock.yaml mapclay src/css/easymde.min.css +stats.html diff --git a/package.json b/package.json index 48717fc..9ee1a77 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "eslint-plugin-promise": "^7.1.0", "globals": "^15.9.0", "rollup": "^4.21.3", + "rollup-plugin-bundle-stats": "^4.15.1", "stylelint": "^16.9.0", "stylelint-config-standard": "^36.0.1", "stylelint-order": "^6.0.4" diff --git a/rollup.config.js b/rollup.config.js index 1f46f2a..75db905 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -3,6 +3,7 @@ import commonjs from '@rollup/plugin-commonjs'; import terser from '@rollup/plugin-terser'; import { existsSync } from 'fs'; import { join } from 'path'; +import { bundleStats } from 'rollup-plugin-bundle-stats'; const production = !process.env.ROLLUP_WATCH; @@ -53,6 +54,7 @@ const general = { node(), commonjs(), production && terser(), + // bundleStats(), ], } -- cgit v1.2.3-70-g09d2