solid-optimizer 0.4.0 → 1.0.0-next.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 +74 -47
- package/dist/{compile-BQuBDA0Q.d.mts → compile-BRCj4UN7.d.mts} +15 -22
- package/dist/compile-BRCj4UN7.d.mts.map +1 -0
- package/dist/{compile-D3caSUtw.mjs → compile-Cz6hbiQv.mjs} +943 -670
- package/dist/compile-Cz6hbiQv.mjs.map +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/vite.d.mts +3 -10
- package/dist/vite.d.mts.map +1 -1
- package/dist/vite.mjs +305 -204
- package/dist/vite.mjs.map +1 -1
- package/package.json +10 -11
- package/src/compile.ts +16 -40
- package/src/constants.ts +42 -2
- package/src/context.ts +3 -0
- package/src/copy-size.ts +73 -0
- package/src/fold.ts +619 -17
- package/src/inline.ts +352 -292
- package/src/memo.ts +161 -30
- package/src/provider.ts +40 -75
- package/src/scope.ts +14 -1
- package/src/size.ts +35 -75
- package/src/vite/globals.ts +67 -0
- package/src/vite/index.ts +279 -264
- package/src/vite/inject.ts +14 -4
- package/src/vite/runtime.ts +23 -3
- package/dist/compile-BQuBDA0Q.d.mts.map +0 -1
- package/dist/compile-D3caSUtw.mjs.map +0 -1
- package/src/server.ts +0 -275
package/dist/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as readModuleConstants, c as
|
|
1
|
+
import { a as readModuleConstants, c as SkipPass, i as compile, l as Primitive, n as CompileResult, o as ImportedConstants, r as ModuleConstants, s as Skip, t as CompileOptions } from "./compile-BRCj4UN7.mjs";
|
|
2
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-
|
|
1
|
+
import { n as readModuleConstants, t as compile } from "./compile-Cz6hbiQv.mjs";
|
|
2
2
|
export { compile, readModuleConstants };
|
package/dist/vite.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { s as Skip, t as CompileOptions } from "./compile-BRCj4UN7.mjs";
|
|
2
|
+
import { Options as Options$1 } from "@solidjs/vite-plugin";
|
|
2
3
|
import { Plugin } from "vite";
|
|
3
|
-
import { Options as Options$1 } from "vite-plugin-solid";
|
|
4
4
|
//#region src/vite/report.d.ts
|
|
5
5
|
/** What the optimizer left alone in one build environment. */
|
|
6
6
|
interface OptimizerReport {
|
|
@@ -11,13 +11,6 @@ interface OptimizerReport {
|
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/vite/index.d.ts
|
|
13
13
|
export interface OptimizerOptions extends Pick<CompileOptions, 'fold' | 'inline' | 'alwaysInline' | 'contexts' | 'memos' | 'maxPasses'> {
|
|
14
|
-
/**
|
|
15
|
-
* Reduce Solid's reactive primitives to what they do on the server, in
|
|
16
|
-
* server builds. See the `server` option of `compile`.
|
|
17
|
-
*
|
|
18
|
-
* @default true
|
|
19
|
-
*/
|
|
20
|
-
server?: boolean;
|
|
21
14
|
/**
|
|
22
15
|
* Where the optimizer runs.
|
|
23
16
|
*
|
|
@@ -44,7 +37,7 @@ export interface OptimizerOptions extends Pick<CompileOptions, 'fold' | 'inline'
|
|
|
44
37
|
report?: boolean | ((report: OptimizerReport) => void);
|
|
45
38
|
}
|
|
46
39
|
export interface Options extends Partial<Options$1> {
|
|
47
|
-
/** Set to `false` to use
|
|
40
|
+
/** Set to `false` to use `@solidjs/vite-plugin` as it is. */
|
|
48
41
|
optimizer?: OptimizerOptions | false;
|
|
49
42
|
}
|
|
50
43
|
export default function solidOptimizer(options?: Options): Plugin[];
|
package/dist/vite.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite.d.mts","names":["SolidPluginOptions"],"sources":["../src/vite/report.ts","../src/vite/index.ts"],"mappings":";;;;;UAUiB;;WAEN;WACA,gBAAgB;;;;
|
|
1
|
+
{"version":3,"file":"vite.d.mts","names":["SolidPluginOptions"],"sources":["../src/vite/report.ts","../src/vite/index.ts"],"mappings":";;;;;UAUiB;;WAEN;WACA,gBAAgB;;;;iBCwCV,yBAAyB,KACxC;;;;;;;;;EAWA;;;;;;EAMA;;;;;;;;;EASA,qBAAqB,QAAQ;;iBAKd,gBAAgB,QAAQA;;EAEvC,YAAY;;wBAuIU,eAAe,UAAS,UAAe"}
|