solid-optimizer 0.1.2 → 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.
- package/LICENSE +18 -4
- package/README.md +269 -14
- package/dist/compile-BroGlagZ.d.mts +172 -0
- package/dist/compile-BroGlagZ.d.mts.map +1 -0
- package/dist/compile-ocDYvJUW.mjs +3910 -0
- package/dist/compile-ocDYvJUW.mjs.map +1 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +2 -0
- package/dist/vite.d.mts +35 -0
- package/dist/vite.d.mts.map +1 -0
- package/dist/vite.mjs +1465 -0
- package/dist/vite.mjs.map +1 -0
- package/package.json +60 -58
- package/src/ast.ts +263 -0
- package/src/compile.ts +304 -0
- package/src/constants.ts +249 -0
- package/src/context.ts +87 -0
- package/src/fold.ts +850 -0
- package/src/index.ts +4 -319
- package/src/inline.ts +2028 -0
- package/src/jsx.ts +170 -0
- package/src/memo.ts +383 -0
- package/src/provider.ts +842 -0
- package/src/scope.ts +588 -0
- package/src/server.ts +275 -0
- package/src/size.ts +307 -0
- package/src/value.ts +386 -0
- package/src/vite/index.ts +1135 -0
- package/src/vite/inject.ts +311 -0
- package/src/vite/namespace.ts +66 -0
- package/src/vite/runtime.ts +390 -0
- package/src/vite/usage.ts +405 -0
- package/dist/cjs/development/index.cjs +0 -316
- package/dist/cjs/development/index.cjs.map +0 -7
- package/dist/cjs/production/index.cjs +0 -1
- package/dist/esm/development/index.mjs +0 -285
- package/dist/esm/development/index.mjs.map +0 -7
- package/dist/esm/production/index.mjs +0 -1
- package/dist/types/index.d.ts +0 -12
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/unwrap-node.d.ts +0 -7
- package/dist/types/unwrap-node.d.ts.map +0 -1
- package/src/unwrap-node.ts +0 -27
package/dist/index.d.mts
ADDED
|
@@ -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
package/dist/vite.d.mts
ADDED
|
@@ -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"}
|