@rsbuild/plugin-solid 1.2.0 → 1.2.2

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.cjs CHANGED
@@ -1,11 +1,14 @@
1
1
  "use strict";
2
2
  const __rslib_import_meta_url__ = "u" < typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
3
3
  var __webpack_require__ = {};
4
- __webpack_require__.d = (exports1, definition)=>{
5
- for(var key in definition)__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key) && Object.defineProperty(exports1, key, {
6
- enumerable: !0,
7
- get: definition[key]
8
- });
4
+ __webpack_require__.d = (exports1, getters, values)=>{
5
+ var define = (defs, kind)=>{
6
+ for(var key in defs)__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key) && Object.defineProperty(exports1, key, {
7
+ enumerable: !0,
8
+ [kind]: defs[key]
9
+ });
10
+ };
11
+ define(getters, "get"), define(values, "value");
9
12
  }, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
10
13
  "u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
11
14
  value: 'Module'
package/dist/index.d.ts CHANGED
@@ -2,36 +2,30 @@ import type { RsbuildPlugin } from '@rsbuild/core';
2
2
  import type { SolidPresetOptions } from './types.js';
3
3
  export type PluginSolidOptions = {
4
4
  /**
5
- * Whether to resolve Solid's development runtime.
6
- * @default `true` in development mode, `false` in production mode
7
- */
8
- dev?: boolean;
5
+ * Whether to resolve Solid's development runtime.
6
+ * @default `true` in development mode, `false` in production mode
7
+ */ dev?: boolean;
9
8
  /**
10
- * Whether to generate output for Solid SSR.
11
- * @default false
12
- */
13
- ssr?: boolean;
9
+ * Whether to generate output for Solid SSR.
10
+ * @default false
11
+ */ ssr?: boolean;
14
12
  /**
15
- * Configure Solid Refresh for HMR in development mode.
16
- */
17
- refresh?: {
13
+ * Configure Solid Refresh for HMR in development mode.
14
+ */ refresh?: {
18
15
  /**
19
- * Whether to disable Solid Refresh while keeping Rsbuild HMR enabled.
20
- * @default false
21
- */
22
- disabled?: boolean;
16
+ * Whether to disable Solid Refresh while keeping Rsbuild HMR enabled.
17
+ * @default false
18
+ */ disabled?: boolean;
23
19
  };
24
20
  /**
25
- * Options passed to `babel-preset-solid`.
26
- * @see https://npmjs.com/package/babel-preset-solid
27
- */
28
- solid?: SolidPresetOptions;
21
+ * Options passed to `babel-preset-solid`.
22
+ * @see https://npmjs.com/package/babel-preset-solid
23
+ */ solid?: SolidPresetOptions;
29
24
  /**
30
- * Options passed to `babel-preset-solid`.
31
- * If both `solid` and `solidPresetOptions` are set, `solid` takes precedence.
32
- * @deprecated Use `solid` instead.
33
- */
34
- solidPresetOptions?: SolidPresetOptions;
25
+ * Options passed to `babel-preset-solid`.
26
+ * If both `solid` and `solidPresetOptions` are set, `solid` takes precedence.
27
+ * @deprecated Use `solid` instead.
28
+ */ solidPresetOptions?: SolidPresetOptions;
35
29
  };
36
- export declare const PLUGIN_SOLID_NAME = "rsbuild:solid";
30
+ export declare const PLUGIN_SOLID_NAME = 'rsbuild:solid';
37
31
  export declare function pluginSolid(options?: PluginSolidOptions): RsbuildPlugin;
package/dist/types.d.ts CHANGED
@@ -4,86 +4,71 @@
4
4
  * https://github.com/solidjs/solid/blob/main/packages/babel-preset-solid/index.js
5
5
  *
6
6
  * https://github.com/ryansolid/dom-expressions/blob/main/packages/babel-plugin-jsx-dom-expressions/README.md
7
- */
8
- export type SolidPresetOptions = {
7
+ */ export type SolidPresetOptions = {
9
8
  /**
10
- * The name of the runtime module to import the methods from.
11
- */
12
- moduleName?: string;
9
+ * The name of the runtime module to import the methods from.
10
+ */ moduleName?: string;
13
11
  /**
14
- * The output mode of the compiler.
15
- * Can be:
16
- * - "dom" is standard output
17
- * - "ssr" is for server side rendering of strings.
18
- * - "universal" is for using custom renderers from solid-js/universal
19
- *
20
- * @default "dom"
21
- */
22
- generate?: 'ssr' | 'dom' | 'universal';
12
+ * The output mode of the compiler.
13
+ * Can be:
14
+ * - "dom" is standard output
15
+ * - "ssr" is for server side rendering of strings.
16
+ * - "universal" is for using custom renderers from solid-js/universal
17
+ *
18
+ * @default "dom"
19
+ */ generate?: 'ssr' | 'dom' | 'universal';
23
20
  /**
24
- * Indicate whether the output should contain hydratable markers.
25
- * @default false
26
- */
27
- hydratable?: boolean;
21
+ * Indicate whether the output should contain hydratable markers.
22
+ * @default false
23
+ */ hydratable?: boolean;
28
24
  /**
29
- * Boolean to indicate whether to enable automatic event delegation on camelCase.
30
- * @default true
31
- */
32
- delegateEvents?: boolean;
25
+ * Boolean to indicate whether to enable automatic event delegation on camelCase.
26
+ * @default true
27
+ */ delegateEvents?: boolean;
33
28
  /**
34
- * Boolean indicates whether smart conditional detection should be used. This optimizes simple boolean expressions and ternaries in JSX.
35
- * @default true
36
- */
37
- wrapConditionals?: boolean;
29
+ * Boolean indicates whether smart conditional detection should be used. This optimizes simple boolean expressions and ternaries in JSX.
30
+ * @default true
31
+ */ wrapConditionals?: boolean;
38
32
  /**
39
- * Boolean indicates whether to set current render context on Custom Elements and slots. Useful for seamless Context API with Web Components.
40
- * @default false
41
- */
42
- contextToCustomElements?: boolean;
33
+ * Boolean indicates whether to set current render context on Custom Elements and slots. Useful for seamless Context API with Web Components.
34
+ * @default false
35
+ */ contextToCustomElements?: boolean;
43
36
  /**
44
- * Array of Component exports from module, that aren't included by default with the library. This plugin will automatically import them if it comes across them in the JSX.
45
- * @default string[]
46
- */
47
- builtIns?: string[];
37
+ * Array of Component exports from module, that aren't included by default with the library. This plugin will automatically import them if it comes across them in the JSX.
38
+ * @default string[]
39
+ */ builtIns?: string[];
48
40
  /**
49
- * This plugin leverages a heuristic for reactive wrapping and lazy evaluation of JSX expressions.
50
- * @default 'effect'
51
- */
52
- effectWrapper?: string;
41
+ * This plugin leverages a heuristic for reactive wrapping and lazy evaluation of JSX expressions.
42
+ * @default 'effect'
43
+ */ effectWrapper?: string;
53
44
  /**
54
- * Comment decorator string indicates the static expression, used to tell the compiler not to wrap them by effect function
55
- * @default '@once'
56
- */
57
- staticMarker?: string;
45
+ * Comment decorator string indicates the static expression, used to tell the compiler not to wrap them by effect function
46
+ * @default '@once'
47
+ */ staticMarker?: string;
58
48
  /**
59
- * Memos let you efficiently use a derived value in many reactive computations. This option indicates the memo function name
60
- * @default 'memo'
61
- */
62
- memoWrapper?: string;
49
+ * Memos let you efficiently use a derived value in many reactive computations. This option indicates the memo function name
50
+ * @default 'memo'
51
+ */ memoWrapper?: string;
63
52
  /**
64
- * Checks for properly formed HTML by checking for elements that would not be allowed in certain parent elements.
65
- * @default true
66
- */
67
- validate?: boolean;
53
+ * Checks for properly formed HTML by checking for elements that would not be allowed in certain parent elements.
54
+ * @default true
55
+ */ validate?: boolean;
68
56
  /**
69
- * Remove unnecessary closing tags from template strings. More info here:
70
- * https://github.com/solidjs/solid/blob/main/CHANGELOG.md#smaller-templates
71
- *
72
- * @default false
73
- */
74
- omitNestedClosingTags?: boolean;
57
+ * Remove unnecessary closing tags from template strings. More info here:
58
+ * https://github.com/solidjs/solid/blob/main/CHANGELOG.md#smaller-templates
59
+ *
60
+ * @default false
61
+ */ omitNestedClosingTags?: boolean;
75
62
  /**
76
- * Remove the last closing tag from template strings. Enabled by default even when `omitNestedClosingTags` is disabled.
77
- * Can be disabled for compatibility for some browser-like environments.
78
- *
79
- * @default true
80
- */
81
- omitLastClosingTag?: boolean;
63
+ * Remove the last closing tag from template strings. Enabled by default even when `omitNestedClosingTags` is disabled.
64
+ * Can be disabled for compatibility for some browser-like environments.
65
+ *
66
+ * @default true
67
+ */ omitLastClosingTag?: boolean;
82
68
  /**
83
- * Remove unnecessary quotes from template strings.
84
- * Can be disabled for compatibility for some browser-like environments.
85
- *
86
- * @default true
87
- */
88
- omitQuotes?: boolean;
69
+ * Remove unnecessary quotes from template strings.
70
+ * Can be disabled for compatibility for some browser-like environments.
71
+ *
72
+ * @default true
73
+ */ omitQuotes?: boolean;
89
74
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-solid",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Solid plugin for Rsbuild",
5
5
  "homepage": "https://rsbuild.rs",
6
6
  "repository": {
@@ -23,18 +23,18 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "babel-preset-solid": "^1.9.12",
26
- "solid-refresh": "^0.7.8",
27
- "@rsbuild/plugin-babel": "1.1.2"
26
+ "solid-refresh": "^0.6.3",
27
+ "@rsbuild/plugin-babel": "1.2.1"
28
28
  },
29
29
  "devDependencies": {
30
- "@rslib/core": "0.21.3",
30
+ "@rslib/core": "0.22.0",
31
31
  "@types/babel__core": "^7.20.5",
32
32
  "typescript": "^6.0.3",
33
- "@rsbuild/core": "2.0.3",
34
- "@scripts/test-helper": "1.0.0"
33
+ "@scripts/test-helper": "1.0.0",
34
+ "@rsbuild/core": "2.0.11"
35
35
  },
36
36
  "peerDependencies": {
37
- "@rsbuild/core": "^1.0.0 || ^2.0.0-0"
37
+ "@rsbuild/core": "^1.0.0 || ^2.0.0"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
40
  "@rsbuild/core": {