rollup-plugin-stats 1.5.6 → 2.0.0-beta.0
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 +1 -1
- package/dist/_virtual/_rolldown/runtime.cjs +29 -0
- package/dist/extract.cjs +41 -94
- package/dist/extract.cjs.map +1 -1
- package/dist/extract.d.cts +53 -0
- package/dist/extract.d.mts +53 -0
- package/dist/extract.mjs +41 -92
- package/dist/extract.mjs.map +1 -1
- package/dist/index.cjs +30 -78
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -0
- package/dist/index.d.mts +26 -0
- package/dist/index.mjs +27 -76
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.cts +9 -0
- package/dist/types.d.mts +9 -0
- package/dist/utils/check-exclude-filepath.cjs +21 -0
- package/dist/utils/check-exclude-filepath.cjs.map +1 -0
- package/dist/utils/check-exclude-filepath.d.cts +6 -0
- package/dist/utils/check-exclude-filepath.d.mts +6 -0
- package/dist/utils/check-exclude-filepath.mjs +20 -0
- package/dist/utils/check-exclude-filepath.mjs.map +1 -0
- package/dist/utils/format-file-size.cjs +29 -0
- package/dist/utils/format-file-size.cjs.map +1 -0
- package/dist/utils/format-file-size.mjs +29 -0
- package/dist/utils/format-file-size.mjs.map +1 -0
- package/dist/utils/omit.cjs +13 -0
- package/dist/utils/omit.cjs.map +1 -0
- package/dist/utils/omit.mjs +12 -0
- package/dist/utils/omit.mjs.map +1 -0
- package/dist/utils/round.cjs +10 -0
- package/dist/utils/round.cjs.map +1 -0
- package/dist/utils/round.mjs +9 -0
- package/dist/utils/round.mjs.map +1 -0
- package/dist/write.cjs +20 -0
- package/dist/write.cjs.map +1 -0
- package/dist/write.d.cts +9 -0
- package/dist/write.d.mts +9 -0
- package/dist/write.mjs +17 -0
- package/dist/write.mjs.map +1 -0
- package/package.json +35 -21
- package/dist/extract.d.ts +0 -48
- package/dist/index.d.ts +0 -22
- package/dist/types.d.ts +0 -4
- package/dist/utils/check-exclude-filepath.d.ts +0 -7
- package/dist/utils/format-file-size.d.ts +0 -1
- package/dist/utils/omit.d.ts +0 -1
- package/dist/utils/round.d.ts +0 -1
- package/dist/write.d.ts +0 -6
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { StatsOptions } from "./extract.mjs";
|
|
2
|
+
import { RollupStatsWrite } from "./write.mjs";
|
|
3
|
+
import { OutputOptions, Plugin } from "./types.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/index.d.ts
|
|
6
|
+
type RollupStatsOptions = {
|
|
7
|
+
/**
|
|
8
|
+
* Output filename relative to Rollup output directory or absolute
|
|
9
|
+
* @default: stats.json
|
|
10
|
+
*/
|
|
11
|
+
fileName?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Rollup stats options
|
|
14
|
+
*/
|
|
15
|
+
stats?: StatsOptions;
|
|
16
|
+
/**
|
|
17
|
+
* Custom file writer
|
|
18
|
+
* @default - fs.write(FILENAME, JSON.stringify(STATS, null, 2));
|
|
19
|
+
*/
|
|
20
|
+
write?: RollupStatsWrite;
|
|
21
|
+
};
|
|
22
|
+
type RollupStatsOptionsOrOutputOptions = RollupStatsOptions | ((outputOptions: OutputOptions) => RollupStatsOptions);
|
|
23
|
+
declare function rollupStats(options?: RollupStatsOptionsOrOutputOptions): Plugin;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { RollupStatsOptions, rollupStats as default };
|
|
26
|
+
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,81 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import extractRollupStats from "./extract.mjs";
|
|
2
|
+
import { rollupStatsWrite } from "./write.mjs";
|
|
3
|
+
import { formatFileSize } from "./utils/format-file-size.mjs";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import process from "node:process";
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
await fs.mkdir(path.dirname(filepath), { recursive: true });
|
|
10
|
-
await fs.writeFile(filepath, content);
|
|
11
|
-
return {
|
|
12
|
-
filepath,
|
|
13
|
-
content,
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function round(value, precision = 2) {
|
|
18
|
-
const multiplier = 10 ^ precision;
|
|
19
|
-
return Math.round(value * multiplier) / multiplier;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const FILE_SIZE = {
|
|
23
|
-
BYTE: {
|
|
24
|
-
symbol: 'B',
|
|
25
|
-
multiplier: 1,
|
|
26
|
-
},
|
|
27
|
-
KILO: {
|
|
28
|
-
symbol: 'KiB',
|
|
29
|
-
multiplier: 1024,
|
|
30
|
-
},
|
|
31
|
-
MEGA: {
|
|
32
|
-
symbol: 'MiB',
|
|
33
|
-
multiplier: 1024 * 1024,
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
function formatFileSize(value) {
|
|
37
|
-
let unit = FILE_SIZE.BYTE;
|
|
38
|
-
if (typeof value !== 'number') {
|
|
39
|
-
return `0${unit.symbol}`;
|
|
40
|
-
}
|
|
41
|
-
if (value < FILE_SIZE.KILO.multiplier) {
|
|
42
|
-
unit = FILE_SIZE.BYTE;
|
|
43
|
-
}
|
|
44
|
-
else if (value < FILE_SIZE.MEGA.multiplier) {
|
|
45
|
-
unit = FILE_SIZE.KILO;
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
unit = FILE_SIZE.MEGA;
|
|
49
|
-
}
|
|
50
|
-
return `${round(value / unit.multiplier, 2)}${unit.symbol}`;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const PLUGIN_NAME = 'rollupStats';
|
|
54
|
-
const DEFAULT_FILE_NAME = 'stats.json';
|
|
7
|
+
//#region src/index.ts
|
|
8
|
+
const PLUGIN_NAME = "rollupStats";
|
|
9
|
+
const DEFAULT_FILE_NAME = "stats.json";
|
|
55
10
|
function rollupStats(options = {}) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
// Log error, but do not throw to allow the compilation to continue
|
|
74
|
-
this.warn(message);
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
};
|
|
11
|
+
return {
|
|
12
|
+
name: PLUGIN_NAME,
|
|
13
|
+
async generateBundle(context, bundle) {
|
|
14
|
+
const { fileName, stats: statsOptions, write = rollupStatsWrite } = (typeof options === "function" ? options(context) : options) || {};
|
|
15
|
+
const resolvedFileName = fileName || DEFAULT_FILE_NAME;
|
|
16
|
+
const filepath = path.isAbsolute(resolvedFileName) ? resolvedFileName : path.join(context.dir || process.cwd(), resolvedFileName);
|
|
17
|
+
const stats = extractRollupStats(bundle, statsOptions);
|
|
18
|
+
try {
|
|
19
|
+
const res = await write(filepath, stats);
|
|
20
|
+
const outputSize = Buffer.byteLength(res.content, "utf-8");
|
|
21
|
+
this.info(`Stats saved to ${res.filepath} (${formatFileSize(outputSize)})`);
|
|
22
|
+
} catch (error) {
|
|
23
|
+
const message = error instanceof Error ? error.message : JSON.stringify(error);
|
|
24
|
+
this.warn(message);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
78
28
|
}
|
|
79
29
|
|
|
30
|
+
//#endregion
|
|
80
31
|
export { rollupStats as default };
|
|
81
|
-
//# sourceMappingURL=index.mjs.map
|
|
32
|
+
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import path from 'node:path';\nimport process from 'node:process';\n\nimport extractRollupStats, { type StatsOptions } from './extract';\nimport { type RollupStatsWrite, rollupStatsWrite } from './write';\nimport { formatFileSize } from './utils/format-file-size';\nimport type { Plugin, OutputOptions } from './types';\n\nconst PLUGIN_NAME = 'rollupStats';\nconst DEFAULT_FILE_NAME = 'stats.json';\n\nexport type RollupStatsOptions = {\n /**\n * Output filename relative to Rollup output directory or absolute\n * @default: stats.json\n */\n fileName?: string;\n /**\n * Rollup stats options\n */\n stats?: StatsOptions;\n /**\n * Custom file writer\n * @default - fs.write(FILENAME, JSON.stringify(STATS, null, 2));\n */\n write?: RollupStatsWrite;\n};\n\ntype RollupStatsOptionsOrOutputOptions =\n | RollupStatsOptions\n | ((outputOptions: OutputOptions) => RollupStatsOptions);\n\nfunction rollupStats(options: RollupStatsOptionsOrOutputOptions = {}): Plugin {\n return {\n name: PLUGIN_NAME,\n async generateBundle(context, bundle) {\n const resolvedOptions =\n typeof options === 'function' ? options(context) : options;\n const {\n fileName,\n stats: statsOptions,\n write = rollupStatsWrite,\n } = resolvedOptions || {};\n\n const resolvedFileName = fileName || DEFAULT_FILE_NAME;\n const filepath = path.isAbsolute(resolvedFileName)\n ? resolvedFileName\n : path.join(context.dir || process.cwd(), resolvedFileName);\n\n const stats = extractRollupStats(bundle, statsOptions);\n\n try {\n const res = await write(filepath, stats);\n const outputSize = Buffer.byteLength(res.content, 'utf-8');\n\n this.info(\n `Stats saved to ${res.filepath} (${formatFileSize(outputSize)})`\n );\n } catch (error: unknown) {\n const message =\n error instanceof Error ? error.message : JSON.stringify(error);\n\n // Log error, but do not throw to allow the compilation to continue\n this.warn(message);\n }\n },\n } satisfies Plugin;\n}\n\nexport default rollupStats;\n"],"mappings":";;;;;;;AAQA,MAAM,cAAc;AACpB,MAAM,oBAAoB;AAuB1B,SAAS,YAAY,UAA6C,EAAE,EAAU;AAC5E,QAAO;EACL,MAAM;EACN,MAAM,eAAe,SAAS,QAAQ;GAGpC,MAAM,EACJ,UACA,OAAO,cACP,QAAQ,sBAJR,OAAO,YAAY,aAAa,QAAQ,QAAQ,GAAG,YAK9B,EAAE;GAEzB,MAAM,mBAAmB,YAAY;GACrC,MAAM,WAAW,KAAK,WAAW,iBAAiB,GAC9C,mBACA,KAAK,KAAK,QAAQ,OAAO,QAAQ,KAAK,EAAE,iBAAiB;GAE7D,MAAM,QAAQ,mBAAmB,QAAQ,aAAa;AAEtD,OAAI;IACF,MAAM,MAAM,MAAM,MAAM,UAAU,MAAM;IACxC,MAAM,aAAa,OAAO,WAAW,IAAI,SAAS,QAAQ;AAE1D,SAAK,KACH,kBAAkB,IAAI,SAAS,IAAI,eAAe,WAAW,CAAC,GAC/D;YACM,OAAgB;IACvB,MAAM,UACJ,iBAAiB,QAAQ,MAAM,UAAU,KAAK,UAAU,MAAM;AAGhE,SAAK,KAAK,QAAQ;;;EAGvB"}
|
package/dist/types.d.cts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OutputBundle, OutputOptions, Plugin } from "rollup";
|
|
2
|
+
import { Plugin as Plugin$1 } from "vite";
|
|
3
|
+
|
|
4
|
+
//#region src/types.d.ts
|
|
5
|
+
type Plugin$2 = Plugin$1 & Plugin;
|
|
6
|
+
type OutputOptions$1 = OutputOptions;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { OutputOptions$1 as OutputOptions, Plugin$2 as Plugin };
|
|
9
|
+
//# sourceMappingURL=types.d.cts.map
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OutputBundle, OutputOptions, Plugin } from "rollup";
|
|
2
|
+
import { Plugin as Plugin$1 } from "vite";
|
|
3
|
+
|
|
4
|
+
//#region src/types.d.ts
|
|
5
|
+
type Plugin$2 = Plugin$1 & Plugin;
|
|
6
|
+
type OutputOptions$1 = OutputOptions;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { OutputOptions$1 as OutputOptions, Plugin$2 as Plugin };
|
|
9
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/utils/check-exclude-filepath.ts
|
|
3
|
+
/**
|
|
4
|
+
* Check if filepath should be excluded based on patterns
|
|
5
|
+
*/
|
|
6
|
+
function checkExcludeFilepath(filepath, patterns) {
|
|
7
|
+
if (!patterns) return false;
|
|
8
|
+
if (Array.isArray(patterns)) {
|
|
9
|
+
let res = false;
|
|
10
|
+
for (let i = 0; i <= patterns.length - 1 && res === false; i++) res = checkExcludeFilepath(filepath, patterns[i]);
|
|
11
|
+
return res;
|
|
12
|
+
}
|
|
13
|
+
if (typeof patterns === "function") return patterns(filepath);
|
|
14
|
+
if (typeof patterns === "string") return Boolean(filepath.match(patterns));
|
|
15
|
+
if ("test" in patterns) return patterns.test(filepath);
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
exports.checkExcludeFilepath = checkExcludeFilepath;
|
|
21
|
+
//# sourceMappingURL=check-exclude-filepath.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-exclude-filepath.cjs","names":[],"sources":["../../src/utils/check-exclude-filepath.ts"],"sourcesContent":["type ExcludeFilepathParam = string | RegExp | ((filepath: string) => boolean);\n\nexport type ExcludeFilepathPatterns = ExcludeFilepathParam | Array<ExcludeFilepathParam>;\n\n/**\n * Check if filepath should be excluded based on patterns\n */\nexport function checkExcludeFilepath(\n filepath: string,\n patterns?: ExcludeFilepathPatterns,\n): boolean {\n if (!patterns) {\n return false;\n }\n\n if (Array.isArray(patterns)) {\n let res = false;\n\n for (let i = 0; i <= patterns.length - 1 && res === false; i++) {\n res = checkExcludeFilepath(filepath, patterns[i]);\n }\n\n return res;\n }\n\n if (typeof patterns === 'function') {\n return patterns(filepath);\n }\n\n if (typeof patterns === 'string') {\n return Boolean(filepath.match(patterns));\n }\n\n if ('test' in patterns) {\n return patterns.test(filepath);\n }\n\n return false;\n}\n"],"mappings":";;;;;AAOA,SAAgB,qBACd,UACA,UACS;AACT,KAAI,CAAC,SACH,QAAO;AAGT,KAAI,MAAM,QAAQ,SAAS,EAAE;EAC3B,IAAI,MAAM;AAEV,OAAK,IAAI,IAAI,GAAG,KAAK,SAAS,SAAS,KAAK,QAAQ,OAAO,IACzD,OAAM,qBAAqB,UAAU,SAAS,GAAG;AAGnD,SAAO;;AAGT,KAAI,OAAO,aAAa,WACtB,QAAO,SAAS,SAAS;AAG3B,KAAI,OAAO,aAAa,SACtB,QAAO,QAAQ,SAAS,MAAM,SAAS,CAAC;AAG1C,KAAI,UAAU,SACZ,QAAO,SAAS,KAAK,SAAS;AAGhC,QAAO"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/utils/check-exclude-filepath.d.ts
|
|
2
|
+
type ExcludeFilepathParam = string | RegExp | ((filepath: string) => boolean);
|
|
3
|
+
type ExcludeFilepathPatterns = ExcludeFilepathParam | Array<ExcludeFilepathParam>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { ExcludeFilepathPatterns };
|
|
6
|
+
//# sourceMappingURL=check-exclude-filepath.d.cts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/utils/check-exclude-filepath.d.ts
|
|
2
|
+
type ExcludeFilepathParam = string | RegExp | ((filepath: string) => boolean);
|
|
3
|
+
type ExcludeFilepathPatterns = ExcludeFilepathParam | Array<ExcludeFilepathParam>;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { ExcludeFilepathPatterns };
|
|
6
|
+
//# sourceMappingURL=check-exclude-filepath.d.mts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region src/utils/check-exclude-filepath.ts
|
|
2
|
+
/**
|
|
3
|
+
* Check if filepath should be excluded based on patterns
|
|
4
|
+
*/
|
|
5
|
+
function checkExcludeFilepath(filepath, patterns) {
|
|
6
|
+
if (!patterns) return false;
|
|
7
|
+
if (Array.isArray(patterns)) {
|
|
8
|
+
let res = false;
|
|
9
|
+
for (let i = 0; i <= patterns.length - 1 && res === false; i++) res = checkExcludeFilepath(filepath, patterns[i]);
|
|
10
|
+
return res;
|
|
11
|
+
}
|
|
12
|
+
if (typeof patterns === "function") return patterns(filepath);
|
|
13
|
+
if (typeof patterns === "string") return Boolean(filepath.match(patterns));
|
|
14
|
+
if ("test" in patterns) return patterns.test(filepath);
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { checkExcludeFilepath };
|
|
20
|
+
//# sourceMappingURL=check-exclude-filepath.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-exclude-filepath.mjs","names":[],"sources":["../../src/utils/check-exclude-filepath.ts"],"sourcesContent":["type ExcludeFilepathParam = string | RegExp | ((filepath: string) => boolean);\n\nexport type ExcludeFilepathPatterns = ExcludeFilepathParam | Array<ExcludeFilepathParam>;\n\n/**\n * Check if filepath should be excluded based on patterns\n */\nexport function checkExcludeFilepath(\n filepath: string,\n patterns?: ExcludeFilepathPatterns,\n): boolean {\n if (!patterns) {\n return false;\n }\n\n if (Array.isArray(patterns)) {\n let res = false;\n\n for (let i = 0; i <= patterns.length - 1 && res === false; i++) {\n res = checkExcludeFilepath(filepath, patterns[i]);\n }\n\n return res;\n }\n\n if (typeof patterns === 'function') {\n return patterns(filepath);\n }\n\n if (typeof patterns === 'string') {\n return Boolean(filepath.match(patterns));\n }\n\n if ('test' in patterns) {\n return patterns.test(filepath);\n }\n\n return false;\n}\n"],"mappings":";;;;AAOA,SAAgB,qBACd,UACA,UACS;AACT,KAAI,CAAC,SACH,QAAO;AAGT,KAAI,MAAM,QAAQ,SAAS,EAAE;EAC3B,IAAI,MAAM;AAEV,OAAK,IAAI,IAAI,GAAG,KAAK,SAAS,SAAS,KAAK,QAAQ,OAAO,IACzD,OAAM,qBAAqB,UAAU,SAAS,GAAG;AAGnD,SAAO;;AAGT,KAAI,OAAO,aAAa,WACtB,QAAO,SAAS,SAAS;AAG3B,KAAI,OAAO,aAAa,SACtB,QAAO,QAAQ,SAAS,MAAM,SAAS,CAAC;AAG1C,KAAI,UAAU,SACZ,QAAO,SAAS,KAAK,SAAS;AAGhC,QAAO"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const require_round = require('./round.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/utils/format-file-size.ts
|
|
4
|
+
const FILE_SIZE = {
|
|
5
|
+
BYTE: {
|
|
6
|
+
symbol: "B",
|
|
7
|
+
multiplier: 1
|
|
8
|
+
},
|
|
9
|
+
KILO: {
|
|
10
|
+
symbol: "KiB",
|
|
11
|
+
multiplier: 1024
|
|
12
|
+
},
|
|
13
|
+
MEGA: {
|
|
14
|
+
symbol: "MiB",
|
|
15
|
+
multiplier: 1024 * 1024
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
function formatFileSize(value) {
|
|
19
|
+
let unit = FILE_SIZE.BYTE;
|
|
20
|
+
if (typeof value !== "number") return `0${unit.symbol}`;
|
|
21
|
+
if (value < FILE_SIZE.KILO.multiplier) unit = FILE_SIZE.BYTE;
|
|
22
|
+
else if (value < FILE_SIZE.MEGA.multiplier) unit = FILE_SIZE.KILO;
|
|
23
|
+
else unit = FILE_SIZE.MEGA;
|
|
24
|
+
return `${require_round.round(value / unit.multiplier, 2)}${unit.symbol}`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
exports.formatFileSize = formatFileSize;
|
|
29
|
+
//# sourceMappingURL=format-file-size.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-file-size.cjs","names":["round"],"sources":["../../src/utils/format-file-size.ts"],"sourcesContent":["import { round } from './round';\n\nconst FILE_SIZE = {\n BYTE: {\n symbol: 'B',\n multiplier: 1,\n },\n KILO: {\n symbol: 'KiB',\n multiplier: 1024,\n },\n MEGA: {\n symbol: 'MiB',\n multiplier: 1024 * 1024,\n },\n}\n\nexport function formatFileSize(value?: number | null): string {\n let unit = FILE_SIZE.BYTE;\n\n if (typeof value !== 'number') {\n return `0${unit.symbol}`;\n }\n\n if (value < FILE_SIZE.KILO.multiplier) {\n unit = FILE_SIZE.BYTE;\n } else if (value < FILE_SIZE.MEGA.multiplier) {\n unit = FILE_SIZE.KILO;\n } else {\n unit = FILE_SIZE.MEGA;\n }\n\n return `${round(value / unit.multiplier, 2)}${unit.symbol}`;\n}\n"],"mappings":";;;AAEA,MAAM,YAAY;CAChB,MAAM;EACJ,QAAQ;EACR,YAAY;EACb;CACD,MAAM;EACJ,QAAQ;EACR,YAAY;EACb;CACD,MAAM;EACJ,QAAQ;EACR,YAAY,OAAO;EACpB;CACF;AAED,SAAgB,eAAe,OAA+B;CAC5D,IAAI,OAAO,UAAU;AAErB,KAAI,OAAO,UAAU,SACnB,QAAO,IAAI,KAAK;AAGlB,KAAI,QAAQ,UAAU,KAAK,WACzB,QAAO,UAAU;UACR,QAAQ,UAAU,KAAK,WAChC,QAAO,UAAU;KAEjB,QAAO,UAAU;AAGnB,QAAO,GAAGA,oBAAM,QAAQ,KAAK,YAAY,EAAE,GAAG,KAAK"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { round } from "./round.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/format-file-size.ts
|
|
4
|
+
const FILE_SIZE = {
|
|
5
|
+
BYTE: {
|
|
6
|
+
symbol: "B",
|
|
7
|
+
multiplier: 1
|
|
8
|
+
},
|
|
9
|
+
KILO: {
|
|
10
|
+
symbol: "KiB",
|
|
11
|
+
multiplier: 1024
|
|
12
|
+
},
|
|
13
|
+
MEGA: {
|
|
14
|
+
symbol: "MiB",
|
|
15
|
+
multiplier: 1024 * 1024
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
function formatFileSize(value) {
|
|
19
|
+
let unit = FILE_SIZE.BYTE;
|
|
20
|
+
if (typeof value !== "number") return `0${unit.symbol}`;
|
|
21
|
+
if (value < FILE_SIZE.KILO.multiplier) unit = FILE_SIZE.BYTE;
|
|
22
|
+
else if (value < FILE_SIZE.MEGA.multiplier) unit = FILE_SIZE.KILO;
|
|
23
|
+
else unit = FILE_SIZE.MEGA;
|
|
24
|
+
return `${round(value / unit.multiplier, 2)}${unit.symbol}`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
export { formatFileSize };
|
|
29
|
+
//# sourceMappingURL=format-file-size.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-file-size.mjs","names":[],"sources":["../../src/utils/format-file-size.ts"],"sourcesContent":["import { round } from './round';\n\nconst FILE_SIZE = {\n BYTE: {\n symbol: 'B',\n multiplier: 1,\n },\n KILO: {\n symbol: 'KiB',\n multiplier: 1024,\n },\n MEGA: {\n symbol: 'MiB',\n multiplier: 1024 * 1024,\n },\n}\n\nexport function formatFileSize(value?: number | null): string {\n let unit = FILE_SIZE.BYTE;\n\n if (typeof value !== 'number') {\n return `0${unit.symbol}`;\n }\n\n if (value < FILE_SIZE.KILO.multiplier) {\n unit = FILE_SIZE.BYTE;\n } else if (value < FILE_SIZE.MEGA.multiplier) {\n unit = FILE_SIZE.KILO;\n } else {\n unit = FILE_SIZE.MEGA;\n }\n\n return `${round(value / unit.multiplier, 2)}${unit.symbol}`;\n}\n"],"mappings":";;;AAEA,MAAM,YAAY;CAChB,MAAM;EACJ,QAAQ;EACR,YAAY;EACb;CACD,MAAM;EACJ,QAAQ;EACR,YAAY;EACb;CACD,MAAM;EACJ,QAAQ;EACR,YAAY,OAAO;EACpB;CACF;AAED,SAAgB,eAAe,OAA+B;CAC5D,IAAI,OAAO,UAAU;AAErB,KAAI,OAAO,UAAU,SACnB,QAAO,IAAI,KAAK;AAGlB,KAAI,QAAQ,UAAU,KAAK,WACzB,QAAO,UAAU;UACR,QAAQ,UAAU,KAAK,WAChC,QAAO,UAAU;KAEjB,QAAO,UAAU;AAGnB,QAAO,GAAG,MAAM,QAAQ,KAAK,YAAY,EAAE,GAAG,KAAK"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/utils/omit.ts
|
|
3
|
+
function omit(data, keys) {
|
|
4
|
+
const result = {};
|
|
5
|
+
Object.keys(data).forEach((key) => {
|
|
6
|
+
if (!keys.includes(key)) result[key] = data[key];
|
|
7
|
+
});
|
|
8
|
+
return result;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
exports.omit = omit;
|
|
13
|
+
//# sourceMappingURL=omit.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omit.cjs","names":[],"sources":["../../src/utils/omit.ts"],"sourcesContent":["export function omit<D extends object, K extends keyof D = keyof D>(\n data: D,\n keys: K[],\n): Omit<D, K> {\n const result = {} as D;\n const objectKeys = Object.keys(data) as Array<K>;\n\n objectKeys.forEach((key) => {\n if (!keys.includes(key)) {\n result[key] = data[key];\n }\n });\n\n return result;\n}\n"],"mappings":";;AAAA,SAAgB,KACd,MACA,MACY;CACZ,MAAM,SAAS,EAAE;AAGjB,CAFmB,OAAO,KAAK,KAAK,CAEzB,SAAS,QAAQ;AAC1B,MAAI,CAAC,KAAK,SAAS,IAAI,CACrB,QAAO,OAAO,KAAK;GAErB;AAEF,QAAO"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/utils/omit.ts
|
|
2
|
+
function omit(data, keys) {
|
|
3
|
+
const result = {};
|
|
4
|
+
Object.keys(data).forEach((key) => {
|
|
5
|
+
if (!keys.includes(key)) result[key] = data[key];
|
|
6
|
+
});
|
|
7
|
+
return result;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
export { omit };
|
|
12
|
+
//# sourceMappingURL=omit.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"omit.mjs","names":[],"sources":["../../src/utils/omit.ts"],"sourcesContent":["export function omit<D extends object, K extends keyof D = keyof D>(\n data: D,\n keys: K[],\n): Omit<D, K> {\n const result = {} as D;\n const objectKeys = Object.keys(data) as Array<K>;\n\n objectKeys.forEach((key) => {\n if (!keys.includes(key)) {\n result[key] = data[key];\n }\n });\n\n return result;\n}\n"],"mappings":";AAAA,SAAgB,KACd,MACA,MACY;CACZ,MAAM,SAAS,EAAE;AAGjB,CAFmB,OAAO,KAAK,KAAK,CAEzB,SAAS,QAAQ;AAC1B,MAAI,CAAC,KAAK,SAAS,IAAI,CACrB,QAAO,OAAO,KAAK;GAErB;AAEF,QAAO"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"round.cjs","names":[],"sources":["../../src/utils/round.ts"],"sourcesContent":["export function round(value: number, precision = 2): number {\n const multiplier = 10 ** precision;\n return Math.round(value * multiplier) / multiplier; \n}\n"],"mappings":";;AAAA,SAAgB,MAAM,OAAe,YAAY,GAAW;CAC1D,MAAM,aAAa,MAAM;AACzB,QAAO,KAAK,MAAM,QAAQ,WAAW,GAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"round.mjs","names":[],"sources":["../../src/utils/round.ts"],"sourcesContent":["export function round(value: number, precision = 2): number {\n const multiplier = 10 ** precision;\n return Math.round(value * multiplier) / multiplier; \n}\n"],"mappings":";AAAA,SAAgB,MAAM,OAAe,YAAY,GAAW;CAC1D,MAAM,aAAa,MAAM;AACzB,QAAO,KAAK,MAAM,QAAQ,WAAW,GAAG"}
|
package/dist/write.cjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
|
|
2
|
+
let node_path = require("node:path");
|
|
3
|
+
node_path = require_runtime.__toESM(node_path);
|
|
4
|
+
let node_fs_promises = require("node:fs/promises");
|
|
5
|
+
node_fs_promises = require_runtime.__toESM(node_fs_promises);
|
|
6
|
+
|
|
7
|
+
//#region src/write.ts
|
|
8
|
+
async function rollupStatsWrite(filepath, stats) {
|
|
9
|
+
const content = JSON.stringify(stats, null, 2);
|
|
10
|
+
await node_fs_promises.default.mkdir(node_path.default.dirname(filepath), { recursive: true });
|
|
11
|
+
await node_fs_promises.default.writeFile(filepath, content);
|
|
12
|
+
return {
|
|
13
|
+
filepath,
|
|
14
|
+
content
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.rollupStatsWrite = rollupStatsWrite;
|
|
20
|
+
//# sourceMappingURL=write.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write.cjs","names":["fs","path"],"sources":["../src/write.ts"],"sourcesContent":["import path from 'node:path';\nimport fs from 'node:fs/promises';\n\nexport type RollupStatsWriteResponse = {\n filepath: string;\n content: string;\n};\n\nexport type RollupStatsWrite = (\n filepath: string,\n stats: Record<string, unknown>\n) => RollupStatsWriteResponse;\n\nexport async function rollupStatsWrite<\n T extends Record<string, unknown> = Record<string, unknown>,\n>(filepath: string, stats: T): Promise<RollupStatsWriteResponse> {\n const content = JSON.stringify(stats, null, 2);\n\n // Create base directory if it does not exist\n await fs.mkdir(path.dirname(filepath), { recursive: true });\n\n await fs.writeFile(filepath, content);\n\n return {\n filepath,\n content,\n };\n}\n"],"mappings":";;;;;;;AAaA,eAAsB,iBAEpB,UAAkB,OAA6C;CAC/D,MAAM,UAAU,KAAK,UAAU,OAAO,MAAM,EAAE;AAG9C,OAAMA,yBAAG,MAAMC,kBAAK,QAAQ,SAAS,EAAE,EAAE,WAAW,MAAM,CAAC;AAE3D,OAAMD,yBAAG,UAAU,UAAU,QAAQ;AAErC,QAAO;EACL;EACA;EACD"}
|
package/dist/write.d.cts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/write.d.ts
|
|
2
|
+
type RollupStatsWriteResponse = {
|
|
3
|
+
filepath: string;
|
|
4
|
+
content: string;
|
|
5
|
+
};
|
|
6
|
+
type RollupStatsWrite = (filepath: string, stats: Record<string, unknown>) => RollupStatsWriteResponse;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { RollupStatsWrite };
|
|
9
|
+
//# sourceMappingURL=write.d.cts.map
|
package/dist/write.d.mts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/write.d.ts
|
|
2
|
+
type RollupStatsWriteResponse = {
|
|
3
|
+
filepath: string;
|
|
4
|
+
content: string;
|
|
5
|
+
};
|
|
6
|
+
type RollupStatsWrite = (filepath: string, stats: Record<string, unknown>) => RollupStatsWriteResponse;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { RollupStatsWrite };
|
|
9
|
+
//# sourceMappingURL=write.d.mts.map
|
package/dist/write.mjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import fs from "node:fs/promises";
|
|
3
|
+
|
|
4
|
+
//#region src/write.ts
|
|
5
|
+
async function rollupStatsWrite(filepath, stats) {
|
|
6
|
+
const content = JSON.stringify(stats, null, 2);
|
|
7
|
+
await fs.mkdir(path.dirname(filepath), { recursive: true });
|
|
8
|
+
await fs.writeFile(filepath, content);
|
|
9
|
+
return {
|
|
10
|
+
filepath,
|
|
11
|
+
content
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { rollupStatsWrite };
|
|
17
|
+
//# sourceMappingURL=write.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write.mjs","names":[],"sources":["../src/write.ts"],"sourcesContent":["import path from 'node:path';\nimport fs from 'node:fs/promises';\n\nexport type RollupStatsWriteResponse = {\n filepath: string;\n content: string;\n};\n\nexport type RollupStatsWrite = (\n filepath: string,\n stats: Record<string, unknown>\n) => RollupStatsWriteResponse;\n\nexport async function rollupStatsWrite<\n T extends Record<string, unknown> = Record<string, unknown>,\n>(filepath: string, stats: T): Promise<RollupStatsWriteResponse> {\n const content = JSON.stringify(stats, null, 2);\n\n // Create base directory if it does not exist\n await fs.mkdir(path.dirname(filepath), { recursive: true });\n\n await fs.writeFile(filepath, content);\n\n return {\n filepath,\n content,\n };\n}\n"],"mappings":";;;;AAaA,eAAsB,iBAEpB,UAAkB,OAA6C;CAC/D,MAAM,UAAU,KAAK,UAAU,OAAO,MAAM,EAAE;AAG9C,OAAM,GAAG,MAAM,KAAK,QAAQ,SAAS,EAAE,EAAE,WAAW,MAAM,CAAC;AAE3D,OAAM,GAAG,UAAU,UAAU,QAAQ;AAErC,QAAO;EACL;EACA;EACD"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup-plugin-stats",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "
|
|
3
|
+
"description": "Vite/Rolldown/Rollup plugin to generate bundle stats JSON file",
|
|
4
|
+
"version": "2.0.0-beta.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -18,42 +18,55 @@
|
|
|
18
18
|
},
|
|
19
19
|
"keywords": [
|
|
20
20
|
"vite",
|
|
21
|
-
"rollup",
|
|
22
21
|
"rolldown",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
22
|
+
"rollup",
|
|
23
|
+
"vite-plugin",
|
|
24
|
+
"rolldown-plugin",
|
|
25
|
+
"rollup-plugin",
|
|
25
26
|
"bundle-stats"
|
|
26
27
|
],
|
|
27
|
-
"main": "dist/index.
|
|
28
|
-
"module": "dist/index.
|
|
29
|
-
"typings": "dist/index.d.ts",
|
|
28
|
+
"main": "./dist/cjs/index.js",
|
|
29
|
+
"module": "./dist/esm/index.js",
|
|
30
|
+
"typings": "./dist/types/index.d.ts",
|
|
30
31
|
"files": [
|
|
31
32
|
"dist"
|
|
32
33
|
],
|
|
33
34
|
"exports": {
|
|
34
35
|
".": {
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
"import": {
|
|
37
|
+
"types": "./dist/index.d.mts",
|
|
38
|
+
"default": "./dist/index.mjs"
|
|
39
|
+
},
|
|
40
|
+
"require": {
|
|
41
|
+
"types": "./dist/index.d.cts",
|
|
42
|
+
"default": "./dist/index.cjs"
|
|
43
|
+
}
|
|
38
44
|
},
|
|
39
45
|
"./extract": {
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
"import": {
|
|
47
|
+
"types": "./dist/extract.d.mts",
|
|
48
|
+
"default": "./dist/extract.mjs"
|
|
49
|
+
},
|
|
50
|
+
"require": {
|
|
51
|
+
"types": "./dist/extract.d.cts",
|
|
52
|
+
"default": "./dist/extract.cjs"
|
|
53
|
+
}
|
|
43
54
|
}
|
|
44
55
|
},
|
|
45
56
|
"engines": {
|
|
46
57
|
"node": ">=18"
|
|
47
58
|
},
|
|
48
59
|
"scripts": {
|
|
49
|
-
"build": "
|
|
60
|
+
"build": "npm run clean && npm run type-check && tsdown",
|
|
61
|
+
"clean": "rimraf ./dist",
|
|
62
|
+
"type-check": "tsc",
|
|
50
63
|
"lint": "eslint .",
|
|
51
64
|
"format": "prettier --write .",
|
|
52
65
|
"test:unit": "vitest test/unit",
|
|
53
66
|
"test:package": "npm run test:package:rolldown && npm run test:package:rollup && npm run test:package:vite",
|
|
54
|
-
"test:package:rolldown": "
|
|
55
|
-
"test:package:rollup": "
|
|
56
|
-
"test:package:vite": "
|
|
67
|
+
"test:package:rolldown": "cd test/package/rolldown && npm run test",
|
|
68
|
+
"test:package:rollup": "cd test/package/rollup && npm run test",
|
|
69
|
+
"test:package:vite": "cd test/package/vite && npm run test",
|
|
57
70
|
"bump": "./scripts/bump.sh",
|
|
58
71
|
"release": "./scripts/release.sh"
|
|
59
72
|
},
|
|
@@ -65,9 +78,8 @@
|
|
|
65
78
|
"devDependencies": {
|
|
66
79
|
"@eslint/js": "9.39.2",
|
|
67
80
|
"@release-it/conventional-changelog": "10.0.5",
|
|
68
|
-
"@
|
|
69
|
-
"@
|
|
70
|
-
"@types/node": "25.2.1",
|
|
81
|
+
"@types/deep-freeze-strict": "1.1.2",
|
|
82
|
+
"@types/node": "^25.2.3",
|
|
71
83
|
"deep-freeze-strict": "1.1.1",
|
|
72
84
|
"eslint": "9.39.2",
|
|
73
85
|
"globals": "17.3.0",
|
|
@@ -75,7 +87,9 @@
|
|
|
75
87
|
"memfs": "4.56.10",
|
|
76
88
|
"prettier": "3.8.1",
|
|
77
89
|
"release-it": "19.2.4",
|
|
90
|
+
"rimraf": "6.0.1",
|
|
78
91
|
"rollup": "4.57.1",
|
|
92
|
+
"tsdown": "0.20.3",
|
|
79
93
|
"typescript": "5.9.3",
|
|
80
94
|
"typescript-eslint": "8.54.0",
|
|
81
95
|
"vite": "7.3.1",
|
package/dist/extract.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { OutputAsset, OutputBundle, OutputChunk, RenderedModule } from 'rollup';
|
|
2
|
-
import { type ExcludeFilepathPatterns } from './utils/check-exclude-filepath';
|
|
3
|
-
export type AssetStatsOptionalProperties = {
|
|
4
|
-
source?: OutputAsset['source'];
|
|
5
|
-
};
|
|
6
|
-
export type AssetStats = Omit<OutputAsset, keyof AssetStatsOptionalProperties> & AssetStatsOptionalProperties;
|
|
7
|
-
export type ModuleStatsOptionalProperties = {
|
|
8
|
-
code?: RenderedModule['code'] | null;
|
|
9
|
-
};
|
|
10
|
-
export type ModuleStats = Omit<RenderedModule, keyof ModuleStatsOptionalProperties> & ModuleStatsOptionalProperties;
|
|
11
|
-
export type ChunkStatsOptionalProperties = {
|
|
12
|
-
code?: OutputChunk['code'];
|
|
13
|
-
map?: OutputChunk['map'];
|
|
14
|
-
};
|
|
15
|
-
export type ChunkStats = Omit<OutputChunk, keyof ChunkStatsOptionalProperties | 'modules'> & {
|
|
16
|
-
modules: Record<string, ModuleStats>;
|
|
17
|
-
} & ChunkStatsOptionalProperties;
|
|
18
|
-
export type Stats = Record<string, AssetStats | ChunkStats>;
|
|
19
|
-
export type StatsOptions = {
|
|
20
|
-
/**
|
|
21
|
-
* Output asset/module sources
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
|
-
source?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Output chunk map
|
|
27
|
-
* @default false
|
|
28
|
-
*/
|
|
29
|
-
map?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Exclude matching assets
|
|
32
|
-
*/
|
|
33
|
-
excludeAssets?: ExcludeFilepathPatterns;
|
|
34
|
-
/**
|
|
35
|
-
* Exclude matching modules
|
|
36
|
-
*/
|
|
37
|
-
excludeModules?: ExcludeFilepathPatterns;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Extract bundler stats
|
|
41
|
-
*
|
|
42
|
-
* Shallow clone stats object before any processing using `omit` to
|
|
43
|
-
* 1. resolve getters
|
|
44
|
-
* 2. prevent changes to the stats object
|
|
45
|
-
*
|
|
46
|
-
* @NOTE structuredClone is not supported by rolldown-vite: https://github.com/vitejs/rolldown-vite/issues/128
|
|
47
|
-
*/
|
|
48
|
-
export default function extractRollupStats(bundle: OutputBundle, options?: StatsOptions): Stats;
|
package/dist/index.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type StatsOptions } from './extract';
|
|
2
|
-
import { type RollupStatsWrite } from './write';
|
|
3
|
-
import type { Plugin, OutputOptions } from './types';
|
|
4
|
-
export type RollupStatsOptions = {
|
|
5
|
-
/**
|
|
6
|
-
* Output filename relative to Rollup output directory or absolute
|
|
7
|
-
* @default: stats.json
|
|
8
|
-
*/
|
|
9
|
-
fileName?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Rollup stats options
|
|
12
|
-
*/
|
|
13
|
-
stats?: StatsOptions;
|
|
14
|
-
/**
|
|
15
|
-
* Custom file writer
|
|
16
|
-
* @default - fs.write(FILENAME, JSON.stringify(STATS, null, 2));
|
|
17
|
-
*/
|
|
18
|
-
write?: RollupStatsWrite;
|
|
19
|
-
};
|
|
20
|
-
type RollupStatsOptionsOrOutputOptions = RollupStatsOptions | ((outputOptions: OutputOptions) => RollupStatsOptions);
|
|
21
|
-
declare function rollupStats(options?: RollupStatsOptionsOrOutputOptions): Plugin;
|
|
22
|
-
export default rollupStats;
|
package/dist/types.d.ts
DELETED