@winner-fed/bundler-rsbuild 0.9.13 → 0.9.14-alpha.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/dist/config/outConfig.d.ts +2 -2
- package/dist/config/toolsConfig.d.ts +1 -1
- package/dist/config/toolsConfig.js +2 -2
- package/dist/schema.d.ts +4 -0
- package/dist/schema.js +112 -0
- package/package.json +9 -10
|
@@ -8,7 +8,7 @@ interface IOpts {
|
|
|
8
8
|
export declare function getOutConfig(opts: IOpts): {
|
|
9
9
|
assetPrefix: string | undefined;
|
|
10
10
|
cleanDistPath: any;
|
|
11
|
-
copy:
|
|
11
|
+
copy: import("../types").ICopy[] | string[];
|
|
12
12
|
cssModules: any;
|
|
13
13
|
dataUriLimit: number;
|
|
14
14
|
injectStyles: boolean;
|
|
@@ -19,7 +19,7 @@ export declare function getOutConfig(opts: IOpts): {
|
|
|
19
19
|
css: string;
|
|
20
20
|
cssAsync: string;
|
|
21
21
|
};
|
|
22
|
-
externals:
|
|
22
|
+
externals: Record<string, string> | never[];
|
|
23
23
|
filenameHash: boolean;
|
|
24
24
|
manifest: boolean | undefined;
|
|
25
25
|
minify: true | {
|
|
@@ -23,7 +23,7 @@ export declare function getToolsConfig(opts: IOpts): {
|
|
|
23
23
|
bundlerChain: (chain: RspackChain, utils: ModifyBundlerChainUtils) => Promise<void>;
|
|
24
24
|
rspack: (config: RspackConfig, utils: ModifyRspackConfigUtils) => Promise<RspackConfig>;
|
|
25
25
|
cssLoader: any;
|
|
26
|
-
postcss: (
|
|
26
|
+
postcss: () => {
|
|
27
27
|
postcssOptions: any;
|
|
28
28
|
};
|
|
29
29
|
styleLoader: any;
|
|
@@ -40,7 +40,7 @@ function getToolsConfig(opts) {
|
|
|
40
40
|
return config;
|
|
41
41
|
},
|
|
42
42
|
cssLoader: userConfig.cssLoader || {},
|
|
43
|
-
postcss: (
|
|
43
|
+
postcss: () => {
|
|
44
44
|
var _a2, _b, _c, _d;
|
|
45
45
|
return {
|
|
46
46
|
postcssOptions: {
|
|
@@ -49,7 +49,7 @@ function getToolsConfig(opts) {
|
|
|
49
49
|
plugins: [
|
|
50
50
|
...((_c = (_b = userConfig.postcssLoader) == null ? void 0 : _b.postcssOptions) == null ? void 0 : _c.plugins) || [],
|
|
51
51
|
// autoprefixer
|
|
52
|
-
((_d = userConfig.rsbuild) == null ? void 0 : _d.lightningcssLoader) === false && require("postcss-preset-env")({
|
|
52
|
+
((_d = userConfig.rsbuild) == null ? void 0 : _d.lightningcssLoader) === false && require("@winner-fed/bundler-utils/compiled/postcss-preset-env")({
|
|
53
53
|
// handle targets for css
|
|
54
54
|
browsers: (0, import_css.getBrowserlist)(userConfig.targets || {}),
|
|
55
55
|
// handle autoprefixer
|
package/dist/schema.d.ts
ADDED
package/dist/schema.js
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/schema.ts
|
|
20
|
+
var schema_exports = {};
|
|
21
|
+
__export(schema_exports, {
|
|
22
|
+
getSchemas: () => getSchemas
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(schema_exports);
|
|
25
|
+
var import_types = require("./types");
|
|
26
|
+
var devTool = [
|
|
27
|
+
"cheap-source-map",
|
|
28
|
+
"cheap-module-source-map",
|
|
29
|
+
"eval",
|
|
30
|
+
"eval-source-map",
|
|
31
|
+
"eval-cheap-source-map",
|
|
32
|
+
"eval-cheap-module-source-map",
|
|
33
|
+
"eval-nosources-cheap-source-map",
|
|
34
|
+
"eval-nosources-cheap-module-source-map",
|
|
35
|
+
"eval-nosources-source-map",
|
|
36
|
+
"source-map",
|
|
37
|
+
"hidden-source-map",
|
|
38
|
+
"hidden-nosources-cheap-source-map",
|
|
39
|
+
"hidden-nosources-cheap-module-source-map",
|
|
40
|
+
"hidden-nosources-source-map",
|
|
41
|
+
"hidden-cheap-source-map",
|
|
42
|
+
"hidden-cheap-module-source-map",
|
|
43
|
+
"inline-source-map",
|
|
44
|
+
"inline-cheap-source-map",
|
|
45
|
+
"inline-cheap-module-source-map",
|
|
46
|
+
"inline-nosources-cheap-source-map",
|
|
47
|
+
"inline-nosources-cheap-module-source-map",
|
|
48
|
+
"inline-nosources-source-map",
|
|
49
|
+
"nosources-source-map",
|
|
50
|
+
"nosources-cheap-source-map",
|
|
51
|
+
"nosources-cheap-module-source-map"
|
|
52
|
+
];
|
|
53
|
+
function getSchemas() {
|
|
54
|
+
return {
|
|
55
|
+
alias: ({ zod }) => zod.record(zod.string(), zod.any()),
|
|
56
|
+
autoCSSModules: ({ zod }) => zod.boolean(),
|
|
57
|
+
autoprefixer: ({ zod }) => zod.record(zod.string(), zod.any()),
|
|
58
|
+
copy: ({ zod }) => zod.array(
|
|
59
|
+
zod.union([
|
|
60
|
+
zod.object({
|
|
61
|
+
from: zod.string(),
|
|
62
|
+
to: zod.string()
|
|
63
|
+
}),
|
|
64
|
+
zod.string()
|
|
65
|
+
])
|
|
66
|
+
),
|
|
67
|
+
cssLoader: ({ zod }) => zod.record(zod.string(), zod.any()),
|
|
68
|
+
cssLoaderModules: ({ zod }) => zod.record(zod.string(), zod.any()),
|
|
69
|
+
cssMinifier: ({ zod }) => zod.enum([import_types.CSSMinifier.parcelCSS, import_types.CSSMinifier.none]),
|
|
70
|
+
cssMinifierOptions: ({ zod }) => zod.record(zod.string(), zod.any()),
|
|
71
|
+
define: ({ zod }) => zod.record(zod.string(), zod.any()),
|
|
72
|
+
devtool: ({ zod }) => zod.union([zod.enum(devTool), zod.boolean()]),
|
|
73
|
+
externals: ({ zod }) => zod.union([
|
|
74
|
+
zod.record(zod.string(), zod.any()),
|
|
75
|
+
zod.string(),
|
|
76
|
+
zod.function()
|
|
77
|
+
]),
|
|
78
|
+
extraBabelPlugins: ({ zod }) => zod.array(zod.union([zod.string(), zod.array(zod.any())])),
|
|
79
|
+
extraBabelPresets: ({ zod }) => zod.array(zod.union([zod.string(), zod.array(zod.any())])),
|
|
80
|
+
extraPostCSSPlugins: ({ zod }) => zod.array(zod.any()),
|
|
81
|
+
forkTSChecker: ({ zod }) => zod.record(zod.string(), zod.any()),
|
|
82
|
+
ftpOptions: ({ zod }) => zod.object({}),
|
|
83
|
+
hash: ({ zod }) => zod.boolean(),
|
|
84
|
+
https: ({ zod }) => zod.object({
|
|
85
|
+
cert: zod.string(),
|
|
86
|
+
hosts: zod.array(zod.string()),
|
|
87
|
+
http2: zod.boolean(),
|
|
88
|
+
key: zod.string()
|
|
89
|
+
}).deepPartial(),
|
|
90
|
+
ignoreMomentLocale: ({ zod }) => zod.boolean(),
|
|
91
|
+
inlineLimit: ({ zod }) => zod.number(),
|
|
92
|
+
jsMinifier: ({ zod }) => zod.enum([import_types.JSMinifier.swc, import_types.JSMinifier.none]),
|
|
93
|
+
jsMinifierOptions: ({ zod }) => zod.record(zod.string(), zod.any()),
|
|
94
|
+
lessLoader: ({ zod }) => zod.record(zod.string(), zod.any()),
|
|
95
|
+
manifest: ({ zod }) => zod.union([zod.boolean(), zod.string()]),
|
|
96
|
+
outputPath: ({ zod }) => zod.string(),
|
|
97
|
+
postcssLoader: ({ zod }) => zod.record(zod.string(), zod.any()),
|
|
98
|
+
proxy: ({ zod }) => zod.union([zod.record(zod.string(), zod.any()), zod.array(zod.any())]),
|
|
99
|
+
publicPath: ({ zod }) => zod.string(),
|
|
100
|
+
sassLoader: ({ zod }) => zod.record(zod.string(), zod.any()),
|
|
101
|
+
seeOptions: ({ zod }) => zod.object({}),
|
|
102
|
+
styleLoader: ({ zod }) => zod.record(zod.string(), zod.any()),
|
|
103
|
+
targets: ({ zod }) => zod.record(zod.string(), zod.any()),
|
|
104
|
+
theme: ({ zod }) => zod.record(zod.string(), zod.any()),
|
|
105
|
+
writeToDisk: ({ zod }) => zod.boolean(),
|
|
106
|
+
zipOptions: ({ zod }) => zod.object({})
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
110
|
+
0 && (module.exports = {
|
|
111
|
+
getSchemas
|
|
112
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@winner-fed/bundler-rsbuild",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.14-alpha.0",
|
|
4
4
|
"description": "@winner-fed/bundler-rsbuild",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,15 +9,14 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@rsbuild/core": "1.0.1-beta.
|
|
13
|
-
"@rsbuild/plugin-babel": "1.0.1-beta.
|
|
14
|
-
"@rsbuild/plugin-less": "1.0.1-beta.
|
|
15
|
-
"@rsbuild/plugin-node-polyfill": "1.0.
|
|
16
|
-
"@rsbuild/plugin-sass": "1.0.1-beta.
|
|
17
|
-
"@rsbuild/plugin-type-check": "1.0.1-beta.
|
|
18
|
-
"
|
|
19
|
-
"@winner-fed/bundler-utils": "0.9.
|
|
20
|
-
"@winner-fed/utils": "0.9.13"
|
|
12
|
+
"@rsbuild/core": "1.0.1-beta.10",
|
|
13
|
+
"@rsbuild/plugin-babel": "1.0.1-beta.10",
|
|
14
|
+
"@rsbuild/plugin-less": "1.0.1-beta.10",
|
|
15
|
+
"@rsbuild/plugin-node-polyfill": "1.0.4",
|
|
16
|
+
"@rsbuild/plugin-sass": "1.0.1-beta.10",
|
|
17
|
+
"@rsbuild/plugin-type-check": "1.0.1-beta.10",
|
|
18
|
+
"@winner-fed/utils": "0.9.14-alpha.0",
|
|
19
|
+
"@winner-fed/bundler-utils": "0.9.14-alpha.0"
|
|
21
20
|
},
|
|
22
21
|
"publishConfig": {
|
|
23
22
|
"access": "public"
|