solid-optimizer 0.3.0 → 0.4.1

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/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as readModuleConstants, i as compile, n as CompileResult, o as ImportedConstants, r as ModuleConstants, s as Primitive, t as CompileOptions } from "./compile-BroGlagZ.mjs";
2
- export { type CompileOptions, type CompileResult, type ImportedConstants, type ModuleConstants, type Primitive, compile, readModuleConstants };
1
+ import { a as readModuleConstants, c as Skip, i as compile, l as SkipPass, n as CompileResult, o as ImportedConstants, r as ModuleConstants, s as Primitive, t as CompileOptions } from "./compile-BQuBDA0Q.mjs";
2
+ export { type CompileOptions, type CompileResult, type ImportedConstants, type ModuleConstants, type Primitive, type Skip, type SkipPass, compile, readModuleConstants };
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as readModuleConstants, t as compile } from "./compile-ocDYvJUW.mjs";
1
+ import { n as readModuleConstants, t as compile } from "./compile-CqhOfBvG.mjs";
2
2
  export { compile, readModuleConstants };
package/dist/vite.d.mts CHANGED
@@ -1,6 +1,14 @@
1
- import { t as CompileOptions } from "./compile-BroGlagZ.mjs";
1
+ import { c as Skip, t as CompileOptions } from "./compile-BQuBDA0Q.mjs";
2
2
  import { Plugin } from "vite";
3
3
  import { Options as Options$1 } from "vite-plugin-solid";
4
+ //#region src/vite/report.d.ts
5
+ /** What the optimizer left alone in one build environment. */
6
+ interface OptimizerReport {
7
+ /** The Vite environment, like `client` or `ssr`. */
8
+ readonly environment: string;
9
+ readonly skips: readonly Skip[];
10
+ }
11
+ //#endregion
4
12
  //#region src/vite/index.d.ts
5
13
  export interface OptimizerOptions extends Pick<CompileOptions, 'fold' | 'inline' | 'alwaysInline' | 'contexts' | 'memos' | 'maxPasses'> {
6
14
  /**
@@ -25,6 +33,15 @@ export interface OptimizerOptions extends Pick<CompileOptions, 'fold' | 'inline'
25
33
  * @default false
26
34
  */
27
35
  dev?: boolean;
36
+ /**
37
+ * Report what the optimizer leaves alone in each build, and why: each
38
+ * component call that stays a call, each provider that stays, and each
39
+ * memo that stays. `true` prints the report. A function receives it
40
+ * instead, once per build environment.
41
+ *
42
+ * @default false
43
+ */
44
+ report?: boolean | ((report: OptimizerReport) => void);
28
45
  }
29
46
  export interface Options extends Partial<Options$1> {
30
47
  /** Set to `false` to use `vite-plugin-solid` as it is. */
@@ -32,4 +49,5 @@ export interface Options extends Partial<Options$1> {
32
49
  }
33
50
  export default function solidOptimizer(options?: Options): Plugin[];
34
51
  //#endregion
52
+ export type { OptimizerReport };
35
53
  //# sourceMappingURL=vite.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vite.d.mts","names":["SolidPluginOptions"],"sources":["../src/vite/index.ts"],"mappings":";;;;iBA+CiB,yBAAyB,KACxC;;;;;;;EASA;;;;;;;;;EASA;;;;;;EAMA;;iBAGe,gBAAgB,QAAQA;;EAEvC,YAAY;;wBAmJU,eAAe,UAAS,UAAe"}
1
+ {"version":3,"file":"vite.d.mts","names":["SolidPluginOptions"],"sources":["../src/vite/report.ts","../src/vite/index.ts"],"mappings":";;;;;UAUiB;;WAEN;WACA,gBAAgB;;;;iBCsCV,yBAAyB,KACxC;;;;;;;EASA;;;;;;;;;EASA;;;;;;EAMA;;;;;;;;;EASA,qBAAqB,QAAQ;;iBAKd,gBAAgB,QAAQA;;EAEvC,YAAY;;wBAmOU,eAAe,UAAS,UAAe"}