@rsbuild/plugin-solid 1.0.6 → 1.0.8

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 CHANGED
@@ -7,7 +7,7 @@ An Rsbuild plugin to provide support for Solid.
7
7
  <img src="https://img.shields.io/npm/v/@rsbuild/plugin-solid?style=flat-square&colorA=564341&colorB=EDED91" alt="npm version" />
8
8
  </a>
9
9
  <img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="license" />
10
- <a href="https://npmcharts.com/compare/@rsbuild/plugin-solid?minimal=true"><img src="https://img.shields.io/npm/dm/@rsbuild/plugin-solid.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
10
+ <a href="https://npmcharts.com/compare/@rsbuild/plugin-solid"><img src="https://img.shields.io/npm/dm/@rsbuild/plugin-solid.svg?style=flat-square&colorA=564341&colorB=EDED91" alt="downloads" /></a>
11
11
  </p>
12
12
 
13
13
  ## Documentation
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- let __rslib_import_meta_url__ = 'undefined' == typeof document ? new (require('url'.replace('', ''))).URL('file:' + __filename).href : document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href;
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
4
  __webpack_require__.d = (exports1, definition)=>{
5
5
  for(var key in definition)__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key) && Object.defineProperty(exports1, key, {
@@ -7,7 +7,7 @@ __webpack_require__.d = (exports1, definition)=>{
7
7
  get: definition[key]
8
8
  });
9
9
  }, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
10
- 'undefined' != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
10
+ "u" > typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
11
11
  value: 'Module'
12
12
  }), Object.defineProperty(exports1, '__esModule', {
13
13
  value: !0
@@ -15,15 +15,15 @@ __webpack_require__.d = (exports1, definition)=>{
15
15
  };
16
16
  var __webpack_exports__ = {};
17
17
  __webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
18
- pluginSolid: ()=>pluginSolid,
19
- PLUGIN_SOLID_NAME: ()=>PLUGIN_SOLID_NAME
18
+ PLUGIN_SOLID_NAME: ()=>PLUGIN_SOLID_NAME,
19
+ pluginSolid: ()=>pluginSolid
20
20
  });
21
- let external_node_module_namespaceObject = require("node:module"), plugin_babel_namespaceObject = require("@rsbuild/plugin-babel"), src_require = (0, external_node_module_namespaceObject.createRequire)(__rslib_import_meta_url__), PLUGIN_SOLID_NAME = 'rsbuild:solid';
21
+ const external_node_module_namespaceObject = require("node:module"), plugin_babel_namespaceObject = require("@rsbuild/plugin-babel"), src_require = (0, external_node_module_namespaceObject.createRequire)(__rslib_import_meta_url__), PLUGIN_SOLID_NAME = 'rsbuild:solid';
22
22
  function pluginSolid(options = {}) {
23
23
  return {
24
24
  name: PLUGIN_SOLID_NAME,
25
25
  setup (api) {
26
- api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isProd, target })=>{
26
+ api.modifyBundlerChain((chain, { CHAIN_ID, environment, isProd, target })=>{
27
27
  let environmentConfig = environment.config;
28
28
  (0, plugin_babel_namespaceObject.modifyBabelLoaderOptions)({
29
29
  chain,
@@ -46,10 +46,10 @@ function pluginSolid(options = {}) {
46
46
  }
47
47
  };
48
48
  }
49
- for(var __webpack_i__ in exports.PLUGIN_SOLID_NAME = __webpack_exports__.PLUGIN_SOLID_NAME, exports.pluginSolid = __webpack_exports__.pluginSolid, __webpack_exports__)-1 === [
49
+ for(var __rspack_i in exports.PLUGIN_SOLID_NAME = __webpack_exports__.PLUGIN_SOLID_NAME, exports.pluginSolid = __webpack_exports__.pluginSolid, __webpack_exports__)-1 === [
50
50
  "PLUGIN_SOLID_NAME",
51
51
  "pluginSolid"
52
- ].indexOf(__webpack_i__) && (exports[__webpack_i__] = __webpack_exports__[__webpack_i__]);
52
+ ].indexOf(__rspack_i) && (exports[__rspack_i] = __webpack_exports__[__rspack_i]);
53
53
  Object.defineProperty(exports, '__esModule', {
54
54
  value: !0
55
55
  });
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ function pluginSolid(options = {}) {
5
5
  return {
6
6
  name: PLUGIN_SOLID_NAME,
7
7
  setup (api) {
8
- api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isProd, target })=>{
8
+ api.modifyBundlerChain((chain, { CHAIN_ID, environment, isProd, target })=>{
9
9
  let environmentConfig = environment.config;
10
10
  modifyBabelLoaderOptions({
11
11
  chain,
package/dist/types.d.ts CHANGED
@@ -11,10 +11,15 @@ export type SolidPresetOptions = {
11
11
  */
12
12
  moduleName?: string;
13
13
  /**
14
- * The output mode of the compiler. Can be "dom"(default), "ssr". "dom" is standard output. "ssr" is for server side rendering of strings.
15
- * @default 'dom'
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"
16
21
  */
17
- generate?: 'dom' | 'ssr';
22
+ generate?: 'ssr' | 'dom' | 'universal';
18
23
  /**
19
24
  * Indicate whether the output should contain hydratable markers.
20
25
  * @default false
@@ -61,8 +66,24 @@ export type SolidPresetOptions = {
61
66
  */
62
67
  validate?: boolean;
63
68
  /**
64
- * Removes unnecessary closing tags from the template output.
65
- * @default true
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
66
73
  */
67
74
  omitNestedClosingTags?: boolean;
75
+ /**
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;
82
+ /**
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;
68
89
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-solid",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Solid plugin for Rsbuild",
5
5
  "homepage": "https://rsbuild.rs",
6
6
  "repository": {
@@ -23,19 +23,19 @@
23
23
  "dist"
24
24
  ],
25
25
  "dependencies": {
26
- "babel-preset-solid": "^1.9.6",
26
+ "babel-preset-solid": "^1.9.10",
27
27
  "solid-refresh": "0.6.3",
28
- "@rsbuild/plugin-babel": "1.0.6"
28
+ "@rsbuild/plugin-babel": "1.1.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@rslib/core": "0.11.1",
31
+ "@rslib/core": "0.19.6",
32
32
  "@types/babel__core": "^7.20.5",
33
- "typescript": "^5.9.2",
34
- "@rsbuild/core": "1.4.14",
33
+ "typescript": "^5.9.3",
34
+ "@rsbuild/core": "2.0.0-beta.4",
35
35
  "@scripts/test-helper": "1.0.1"
36
36
  },
37
37
  "peerDependencies": {
38
- "@rsbuild/core": "1.x"
38
+ "@rsbuild/core": "^1.0.0 || ^2.0.0-0"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "scripts": {
45
45
  "build": "rslib build",
46
- "dev": "rslib build --watch",
47
- "bump": "npx bumpp --no-tag"
46
+ "dev": "rslib build -w",
47
+ "bump": "pnpx bumpp --no-tag"
48
48
  }
49
49
  }