@rsbuild/plugin-toml 1.1.1 → 1.1.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 +20 -38
- package/package.json +11 -11
package/dist/index.cjs
CHANGED
|
@@ -1,21 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
toml: function(module) {
|
|
4
|
-
module.exports = import("toml").then(function(module) {
|
|
5
|
-
return module;
|
|
6
|
-
});
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
var __webpack_module_cache__ = {};
|
|
10
|
-
function __webpack_require__(moduleId) {
|
|
11
|
-
var cachedModule = __webpack_module_cache__[moduleId];
|
|
12
|
-
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
13
|
-
var module = __webpack_module_cache__[moduleId] = {
|
|
14
|
-
exports: {}
|
|
15
|
-
};
|
|
16
|
-
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
17
|
-
return module.exports;
|
|
18
|
-
}
|
|
2
|
+
var __webpack_require__ = {};
|
|
19
3
|
(()=>{
|
|
20
4
|
__webpack_require__.d = (exports1, definition)=>{
|
|
21
5
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
@@ -38,28 +22,26 @@ function __webpack_require__(moduleId) {
|
|
|
38
22
|
};
|
|
39
23
|
})();
|
|
40
24
|
var __webpack_exports__ = {};
|
|
41
|
-
(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
PLUGIN_TOML_NAME: ()=>PLUGIN_TOML_NAME,
|
|
28
|
+
pluginToml: ()=>pluginToml
|
|
29
|
+
});
|
|
30
|
+
const PLUGIN_TOML_NAME = 'rsbuild:toml';
|
|
31
|
+
const pluginToml = (options = {})=>({
|
|
32
|
+
name: PLUGIN_TOML_NAME,
|
|
33
|
+
async setup (api) {
|
|
34
|
+
const { parse } = await import("toml");
|
|
35
|
+
const { esModule = true } = options;
|
|
36
|
+
api.transform({
|
|
37
|
+
test: /\.toml$/
|
|
38
|
+
}, ({ code })=>{
|
|
39
|
+
const parsed = parse(code);
|
|
40
|
+
const exportType = esModule ? 'export default' : 'module.exports =';
|
|
41
|
+
return `${exportType} ${JSON.stringify(parsed, void 0, '\t')};`;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
46
44
|
});
|
|
47
|
-
const PLUGIN_TOML_NAME = 'rsbuild:toml';
|
|
48
|
-
const pluginToml = (options = {})=>({
|
|
49
|
-
name: PLUGIN_TOML_NAME,
|
|
50
|
-
async setup (api) {
|
|
51
|
-
const { parse } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "toml"));
|
|
52
|
-
const { esModule = true } = options;
|
|
53
|
-
api.transform({
|
|
54
|
-
test: /\.toml$/
|
|
55
|
-
}, ({ code })=>{
|
|
56
|
-
const parsed = parse(code);
|
|
57
|
-
const exportType = esModule ? 'export default' : 'module.exports =';
|
|
58
|
-
return `${exportType} ${JSON.stringify(parsed, void 0, '\t')};`;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
})();
|
|
63
45
|
exports.PLUGIN_TOML_NAME = __webpack_exports__.PLUGIN_TOML_NAME;
|
|
64
46
|
exports.pluginToml = __webpack_exports__.pluginToml;
|
|
65
47
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/plugin-toml",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"repository": "https://github.com/
|
|
3
|
+
"version": "1.1.2",
|
|
4
|
+
"repository": "https://github.com/rstackjs/rsbuild-plugin-toml",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -39,24 +39,24 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@biomejs/biome": "^1.9.4",
|
|
42
|
-
"@playwright/test": "^1.
|
|
43
|
-
"@rsbuild/core": "1.
|
|
44
|
-
"@rslib/core": "^0.
|
|
45
|
-
"@types/node": "^
|
|
46
|
-
"nano-staged": "^0.
|
|
47
|
-
"playwright": "^1.
|
|
42
|
+
"@playwright/test": "^1.57.0",
|
|
43
|
+
"@rsbuild/core": "1.6.10",
|
|
44
|
+
"@rslib/core": "^0.18.2",
|
|
45
|
+
"@types/node": "^24.10.1",
|
|
46
|
+
"nano-staged": "^0.9.0",
|
|
47
|
+
"playwright": "^1.57.0",
|
|
48
48
|
"simple-git-hooks": "^2.13.1",
|
|
49
|
-
"typescript": "^5.9.
|
|
49
|
+
"typescript": "^5.9.3"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@rsbuild/core": "1.
|
|
52
|
+
"@rsbuild/core": "^1.0.0 || ^2.0.0-0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@rsbuild/core": {
|
|
56
56
|
"optional": true
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
-
"packageManager": "pnpm@10.
|
|
59
|
+
"packageManager": "pnpm@10.24.0",
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public",
|
|
62
62
|
"registry": "https://registry.npmjs.org/"
|