@rsbuild/core 0.6.15 → 0.7.0-beta.1
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/bin/rsbuild.js +1 -1
- package/compiled/css-loader/api.js +85 -0
- package/compiled/css-loader/getUrl.js +26 -0
- package/compiled/css-loader/index.d.ts +1 -0
- package/compiled/css-loader/index.js +7363 -0
- package/compiled/css-loader/license +20 -0
- package/compiled/css-loader/noSourceMaps.js +5 -0
- package/compiled/css-loader/package.json +1 -0
- package/compiled/css-loader/sourceMaps.js +16 -0
- package/compiled/less-loader/index.d.ts +1 -0
- package/compiled/less-loader/index.js +414 -0
- package/compiled/less-loader/license +20 -0
- package/compiled/less-loader/package.json +1 -0
- package/compiled/postcss-load-config/292.index.js +2533 -0
- package/compiled/postcss-load-config/344.index.js +21 -0
- package/compiled/postcss-load-config/index.d.ts +1 -0
- package/compiled/postcss-load-config/index.js +1201 -0
- package/compiled/postcss-load-config/license +20 -0
- package/compiled/postcss-load-config/package.json +1 -0
- package/compiled/postcss-loader/index.d.ts +1 -0
- package/compiled/postcss-loader/index.js +9278 -0
- package/compiled/postcss-loader/license +20 -0
- package/compiled/postcss-loader/package.json +1 -0
- package/compiled/postcss-value-parser/index.d.ts +1 -0
- package/compiled/postcss-value-parser/index.js +624 -0
- package/compiled/postcss-value-parser/license +22 -0
- package/compiled/postcss-value-parser/package.json +1 -0
- package/compiled/resolve-url-loader/index.d.ts +1 -0
- package/compiled/resolve-url-loader/index.js +5719 -0
- package/compiled/resolve-url-loader/license +21 -0
- package/compiled/resolve-url-loader/package.json +1 -0
- package/compiled/style-loader/index.d.ts +1 -0
- package/compiled/style-loader/index.js +513 -0
- package/compiled/style-loader/license +20 -0
- package/compiled/style-loader/package.json +1 -0
- package/compiled/style-loader/runtime/injectStylesIntoLinkTag.js +29 -0
- package/compiled/style-loader/runtime/injectStylesIntoStyleTag.js +84 -0
- package/compiled/style-loader/runtime/insertBySelector.js +34 -0
- package/compiled/style-loader/runtime/insertStyleElement.js +10 -0
- package/compiled/style-loader/runtime/isEqualLocals.js +28 -0
- package/compiled/style-loader/runtime/isOldIE.js +17 -0
- package/compiled/style-loader/runtime/setAttributesWithAttributes.js +13 -0
- package/compiled/style-loader/runtime/setAttributesWithAttributesAndNonce.js +9 -0
- package/compiled/style-loader/runtime/setAttributesWithoutAttributes.js +10 -0
- package/compiled/style-loader/runtime/singletonStyleDomAPI.js +86 -0
- package/compiled/style-loader/runtime/styleDomAPI.js +61 -0
- package/compiled/style-loader/runtime/styleTagTransform.js +14 -0
- package/dist/cli/commands.js +2 -2
- package/dist/cli/prepare.js +2 -2
- package/dist/config.js +0 -1
- package/dist/createContext.js +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +8 -8
- package/dist/loadEnv.js +2 -2
- package/dist/{htmlUtils.d.ts → pluginHelper.d.ts} +4 -1
- package/dist/pluginHelper.js +66 -0
- package/dist/plugins/css.d.ts +19 -0
- package/dist/plugins/css.js +257 -0
- package/dist/plugins/index.d.ts +4 -0
- package/dist/plugins/index.js +4 -0
- package/dist/{provider/plugins → plugins}/less.d.ts +1 -1
- package/dist/{provider/plugins → plugins}/less.js +45 -10
- package/dist/plugins/manifest.js +1 -1
- package/dist/{provider/plugins → plugins}/output.d.ts +1 -1
- package/dist/{provider/plugins → plugins}/output.js +21 -14
- package/dist/plugins/performance.js +5 -11
- package/dist/plugins/resourceHints.js +17 -22
- package/dist/plugins/sass.d.ts +18 -0
- package/dist/{provider/plugins → plugins}/sass.js +83 -12
- package/dist/plugins/startUrl.js +1 -1
- package/dist/provider/plugins/swc.d.ts +0 -2
- package/dist/provider/plugins/swc.js +1 -3
- package/dist/provider/provider.js +4 -4
- package/dist/provider/rspackConfig.js +2 -2
- package/dist/rspack/HtmlAppIconPlugin.js +2 -2
- package/dist/rspack/HtmlBasicPlugin.js +2 -2
- package/dist/rspack/InlineChunkHtmlPlugin.js +2 -2
- package/dist/rspack/ignoreCssLoader.d.ts +2 -0
- package/dist/{htmlUtils.js → rspack/ignoreCssLoader.js} +10 -21
- package/dist/rspack/preload/HtmlPreloadOrPrefetchPlugin.js +3 -3
- package/dist/server/devMiddleware.js +1 -1
- package/dist/server/getDevMiddlewares.js +4 -4
- package/dist/server/middlewares.js +1 -1
- package/dist/server/prodServer.js +3 -3
- package/dist/server/socketServer.d.ts +1 -1
- package/dist/server/socketServer.js +1 -1
- package/package.json +12 -3
- package/dist/provider/css-modules-typescript-pre-loader/index.d.ts +0 -6
- package/dist/provider/css-modules-typescript-pre-loader/index.js +0 -84
- package/dist/provider/css-modules-typescript-pre-loader/postcssIcssExtractPlugin.d.ts +0 -11
- package/dist/provider/css-modules-typescript-pre-loader/postcssIcssExtractPlugin.js +0 -66
- package/dist/provider/plugins/css.d.ts +0 -17
- package/dist/provider/plugins/css.js +0 -202
- package/dist/provider/plugins/sass.d.ts +0 -2
- package/dist/rspack/RemoveCssSourcemapPlugin.d.ts +0 -6
- package/dist/rspack/RemoveCssSourcemapPlugin.js +0 -55
package/bin/rsbuild.js
CHANGED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
5
|
+
Author Tobias Koppers @sokra
|
|
6
|
+
*/
|
|
7
|
+
module.exports = function (cssWithMappingToString) {
|
|
8
|
+
var list = [];
|
|
9
|
+
|
|
10
|
+
// return the list of modules as css string
|
|
11
|
+
list.toString = function toString() {
|
|
12
|
+
return this.map(function (item) {
|
|
13
|
+
var content = "";
|
|
14
|
+
var needLayer = typeof item[5] !== "undefined";
|
|
15
|
+
if (item[4]) {
|
|
16
|
+
content += "@supports (".concat(item[4], ") {");
|
|
17
|
+
}
|
|
18
|
+
if (item[2]) {
|
|
19
|
+
content += "@media ".concat(item[2], " {");
|
|
20
|
+
}
|
|
21
|
+
if (needLayer) {
|
|
22
|
+
content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
|
|
23
|
+
}
|
|
24
|
+
content += cssWithMappingToString(item);
|
|
25
|
+
if (needLayer) {
|
|
26
|
+
content += "}";
|
|
27
|
+
}
|
|
28
|
+
if (item[2]) {
|
|
29
|
+
content += "}";
|
|
30
|
+
}
|
|
31
|
+
if (item[4]) {
|
|
32
|
+
content += "}";
|
|
33
|
+
}
|
|
34
|
+
return content;
|
|
35
|
+
}).join("");
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// import a list of modules into the list
|
|
39
|
+
list.i = function i(modules, media, dedupe, supports, layer) {
|
|
40
|
+
if (typeof modules === "string") {
|
|
41
|
+
modules = [[null, modules, undefined]];
|
|
42
|
+
}
|
|
43
|
+
var alreadyImportedModules = {};
|
|
44
|
+
if (dedupe) {
|
|
45
|
+
for (var k = 0; k < this.length; k++) {
|
|
46
|
+
var id = this[k][0];
|
|
47
|
+
if (id != null) {
|
|
48
|
+
alreadyImportedModules[id] = true;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
for (var _k = 0; _k < modules.length; _k++) {
|
|
53
|
+
var item = [].concat(modules[_k]);
|
|
54
|
+
if (dedupe && alreadyImportedModules[item[0]]) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if (typeof layer !== "undefined") {
|
|
58
|
+
if (typeof item[5] === "undefined") {
|
|
59
|
+
item[5] = layer;
|
|
60
|
+
} else {
|
|
61
|
+
item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
|
|
62
|
+
item[5] = layer;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (media) {
|
|
66
|
+
if (!item[2]) {
|
|
67
|
+
item[2] = media;
|
|
68
|
+
} else {
|
|
69
|
+
item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
|
|
70
|
+
item[2] = media;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (supports) {
|
|
74
|
+
if (!item[4]) {
|
|
75
|
+
item[4] = "".concat(supports);
|
|
76
|
+
} else {
|
|
77
|
+
item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
|
|
78
|
+
item[4] = supports;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
list.push(item);
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
return list;
|
|
85
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = function (url, options) {
|
|
4
|
+
if (!options) {
|
|
5
|
+
options = {};
|
|
6
|
+
}
|
|
7
|
+
if (!url) {
|
|
8
|
+
return url;
|
|
9
|
+
}
|
|
10
|
+
url = String(url.__esModule ? url.default : url);
|
|
11
|
+
|
|
12
|
+
// If url is already wrapped in quotes, remove them
|
|
13
|
+
if (/^['"].*['"]$/.test(url)) {
|
|
14
|
+
url = url.slice(1, -1);
|
|
15
|
+
}
|
|
16
|
+
if (options.hash) {
|
|
17
|
+
url += options.hash;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Should url be wrapped?
|
|
21
|
+
// See https://drafts.csswg.org/css-values-3/#urls
|
|
22
|
+
if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
|
|
23
|
+
return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
|
|
24
|
+
}
|
|
25
|
+
return url;
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = any;
|