@rsbuild/plugin-solid 1.0.5 → 1.0.6
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 +1 -1
- package/dist/index.cjs +10 -12
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -7
- package/package.json +9 -9
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
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;
|
|
3
3
|
var __webpack_require__ = {};
|
|
4
|
-
__webpack_require__.d =
|
|
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, {
|
|
6
6
|
enumerable: !0,
|
|
7
7
|
get: definition[key]
|
|
8
8
|
});
|
|
9
|
-
}, __webpack_require__.o =
|
|
10
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
11
|
-
}, __webpack_require__.r = function(exports1) {
|
|
9
|
+
}, __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop), __webpack_require__.r = (exports1)=>{
|
|
12
10
|
'undefined' != typeof Symbol && Symbol.toStringTag && Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
13
11
|
value: 'Module'
|
|
14
12
|
}), Object.defineProperty(exports1, '__esModule', {
|
|
@@ -17,8 +15,8 @@ __webpack_require__.d = function(exports1, definition) {
|
|
|
17
15
|
};
|
|
18
16
|
var __webpack_exports__ = {};
|
|
19
17
|
__webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_exports__, {
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
pluginSolid: ()=>pluginSolid,
|
|
19
|
+
PLUGIN_SOLID_NAME: ()=>PLUGIN_SOLID_NAME
|
|
22
20
|
});
|
|
23
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';
|
|
24
22
|
function pluginSolid(options = {}) {
|
|
@@ -42,16 +40,16 @@ function pluginSolid(options = {}) {
|
|
|
42
40
|
]
|
|
43
41
|
}, !isProd && environmentConfig.dev.hmr && 'web' === target && (babelOptions.plugins ??= [], babelOptions.plugins.push([
|
|
44
42
|
src_require.resolve('solid-refresh/babel')
|
|
45
|
-
]), chain.resolve.alias.
|
|
46
|
-
'solid-refresh': src_require.resolve('solid-refresh/dist/solid-refresh.mjs')
|
|
47
|
-
})), babelOptions)
|
|
43
|
+
]), chain.resolve.alias.set('solid-refresh', src_require.resolve('solid-refresh/dist/solid-refresh.mjs'))), babelOptions)
|
|
48
44
|
});
|
|
49
45
|
});
|
|
50
46
|
}
|
|
51
47
|
};
|
|
52
48
|
}
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
for(var __webpack_i__ in exports.PLUGIN_SOLID_NAME = __webpack_exports__.PLUGIN_SOLID_NAME, exports.pluginSolid = __webpack_exports__.pluginSolid, __webpack_exports__)-1 === [
|
|
50
|
+
"PLUGIN_SOLID_NAME",
|
|
51
|
+
"pluginSolid"
|
|
52
|
+
].indexOf(__webpack_i__) && (exports[__webpack_i__] = __webpack_exports__[__webpack_i__]);
|
|
53
|
+
Object.defineProperty(exports, '__esModule', {
|
|
56
54
|
value: !0
|
|
57
55
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { SolidPresetOptions } from './types.js';
|
|
|
3
3
|
export type PluginSolidOptions = {
|
|
4
4
|
/**
|
|
5
5
|
* Options passed to `babel-preset-solid`.
|
|
6
|
-
* @see https://
|
|
6
|
+
* @see https://npmjs.com/package/babel-preset-solid
|
|
7
7
|
*/
|
|
8
8
|
solidPresetOptions?: SolidPresetOptions;
|
|
9
9
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
let src_require =
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import { modifyBabelLoaderOptions } from "@rsbuild/plugin-babel";
|
|
3
|
+
let src_require = createRequire(import.meta.url), PLUGIN_SOLID_NAME = 'rsbuild:solid';
|
|
4
4
|
function pluginSolid(options = {}) {
|
|
5
5
|
return {
|
|
6
6
|
name: PLUGIN_SOLID_NAME,
|
|
7
7
|
setup (api) {
|
|
8
8
|
api.modifyBundlerChain(async (chain, { CHAIN_ID, environment, isProd, target })=>{
|
|
9
9
|
let environmentConfig = environment.config;
|
|
10
|
-
|
|
10
|
+
modifyBabelLoaderOptions({
|
|
11
11
|
chain,
|
|
12
12
|
CHAIN_ID,
|
|
13
13
|
modifier: (babelOptions)=>(babelOptions.presets = [
|
|
@@ -22,9 +22,7 @@ function pluginSolid(options = {}) {
|
|
|
22
22
|
]
|
|
23
23
|
}, !isProd && environmentConfig.dev.hmr && 'web' === target && (babelOptions.plugins ??= [], babelOptions.plugins.push([
|
|
24
24
|
src_require.resolve('solid-refresh/babel')
|
|
25
|
-
]), chain.resolve.alias.
|
|
26
|
-
'solid-refresh': src_require.resolve('solid-refresh/dist/solid-refresh.mjs')
|
|
27
|
-
})), babelOptions)
|
|
25
|
+
]), chain.resolve.alias.set('solid-refresh', src_require.resolve('solid-refresh/dist/solid-refresh.mjs'))), babelOptions)
|
|
28
26
|
});
|
|
29
27
|
});
|
|
30
28
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-solid",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Solid plugin for Rsbuild",
|
|
5
|
-
"homepage": "https://rsbuild.
|
|
5
|
+
"homepage": "https://rsbuild.rs",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/web-infra-dev/rsbuild",
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"babel-preset-solid": "^1.9.
|
|
26
|
+
"babel-preset-solid": "^1.9.6",
|
|
27
27
|
"solid-refresh": "0.6.3",
|
|
28
|
-
"@rsbuild/plugin-babel": "1.0.
|
|
28
|
+
"@rsbuild/plugin-babel": "1.0.6"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@rslib/core": "0.
|
|
31
|
+
"@rslib/core": "0.11.1",
|
|
32
32
|
"@types/babel__core": "^7.20.5",
|
|
33
|
-
"typescript": "^5.
|
|
34
|
-
"@rsbuild/core": "1.
|
|
33
|
+
"typescript": "^5.9.2",
|
|
34
|
+
"@rsbuild/core": "1.4.14",
|
|
35
35
|
"@scripts/test-helper": "1.0.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public",
|
|
42
|
-
"provenance": true,
|
|
43
42
|
"registry": "https://registry.npmjs.org/"
|
|
44
43
|
},
|
|
45
44
|
"scripts": {
|
|
46
45
|
"build": "rslib build",
|
|
47
|
-
"dev": "rslib build --watch"
|
|
46
|
+
"dev": "rslib build --watch",
|
|
47
|
+
"bump": "npx bumpp --no-tag"
|
|
48
48
|
}
|
|
49
49
|
}
|