solid-optimizer 0.2.0 → 0.3.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.
Files changed (51) hide show
  1. package/README.md +269 -14
  2. package/dist/compile-BroGlagZ.d.mts +172 -0
  3. package/dist/compile-BroGlagZ.d.mts.map +1 -0
  4. package/dist/compile-ocDYvJUW.mjs +3910 -0
  5. package/dist/compile-ocDYvJUW.mjs.map +1 -0
  6. package/dist/index.d.mts +2 -0
  7. package/dist/index.mjs +2 -0
  8. package/dist/vite.d.mts +35 -0
  9. package/dist/vite.d.mts.map +1 -0
  10. package/dist/vite.mjs +1465 -0
  11. package/dist/vite.mjs.map +1 -0
  12. package/package.json +60 -58
  13. package/src/ast.ts +263 -0
  14. package/src/compile.ts +304 -0
  15. package/src/constants.ts +249 -0
  16. package/src/context.ts +87 -0
  17. package/src/fold.ts +850 -0
  18. package/src/index.ts +4 -107
  19. package/src/inline.ts +2028 -0
  20. package/src/jsx.ts +170 -0
  21. package/src/memo.ts +383 -0
  22. package/src/provider.ts +842 -0
  23. package/src/scope.ts +588 -0
  24. package/src/server.ts +275 -0
  25. package/src/size.ts +307 -0
  26. package/src/value.ts +386 -0
  27. package/src/vite/index.ts +1135 -0
  28. package/src/vite/inject.ts +311 -0
  29. package/src/vite/namespace.ts +66 -0
  30. package/src/vite/runtime.ts +390 -0
  31. package/src/vite/usage.ts +405 -0
  32. package/dist/cjs/development/index.cjs +0 -228
  33. package/dist/cjs/development/index.cjs.map +0 -7
  34. package/dist/cjs/production/index.cjs +0 -1
  35. package/dist/esm/development/index.mjs +0 -197
  36. package/dist/esm/development/index.mjs.map +0 -7
  37. package/dist/esm/production/index.mjs +0 -1
  38. package/dist/types/checks.d.ts +0 -9
  39. package/dist/types/checks.d.ts.map +0 -1
  40. package/dist/types/index.d.ts +0 -3
  41. package/dist/types/index.d.ts.map +0 -1
  42. package/dist/types/path-references-import.d.ts +0 -3
  43. package/dist/types/path-references-import.d.ts.map +0 -1
  44. package/dist/types/unwrap-node.d.ts +0 -7
  45. package/dist/types/unwrap-node.d.ts.map +0 -1
  46. package/dist/types/unwrap-path.d.ts +0 -6
  47. package/dist/types/unwrap-path.d.ts.map +0 -1
  48. package/src/checks.ts +0 -42
  49. package/src/path-references-import.ts +0 -82
  50. package/src/unwrap-node.ts +0 -27
  51. package/src/unwrap-path.ts +0 -18
@@ -0,0 +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 };
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { n as readModuleConstants, t as compile } from "./compile-ocDYvJUW.mjs";
2
+ export { compile, readModuleConstants };
@@ -0,0 +1,35 @@
1
+ import { t as CompileOptions } from "./compile-BroGlagZ.mjs";
2
+ import { Plugin } from "vite";
3
+ import { Options as Options$1 } from "vite-plugin-solid";
4
+ //#region src/vite/index.d.ts
5
+ export interface OptimizerOptions extends Pick<CompileOptions, 'fold' | 'inline' | 'alwaysInline' | 'contexts' | 'memos' | 'maxPasses'> {
6
+ /**
7
+ * Reduce Solid's reactive primitives to what they do on the server, in
8
+ * server builds. See the `server` option of `compile`.
9
+ *
10
+ * @default true
11
+ */
12
+ server?: boolean;
13
+ /**
14
+ * Where the optimizer runs.
15
+ *
16
+ * - `auto` uses chunk mode for client builds that do not hydrate, and module mode otherwise.
17
+ * - `module` optimizes each module on its own.
18
+ *
19
+ * @default 'auto'
20
+ */
21
+ mode?: 'auto' | 'module';
22
+ /**
23
+ * Also optimize while serving, in module mode.
24
+ *
25
+ * @default false
26
+ */
27
+ dev?: boolean;
28
+ }
29
+ export interface Options extends Partial<Options$1> {
30
+ /** Set to `false` to use `vite-plugin-solid` as it is. */
31
+ optimizer?: OptimizerOptions | false;
32
+ }
33
+ export default function solidOptimizer(options?: Options): Plugin[];
34
+ //#endregion
35
+ //# sourceMappingURL=vite.d.mts.map
@@ -0,0 +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"}