@rsbuild/core 1.6.9 → 1.6.11
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/compiled/memfs/index.js +123 -121
- package/compiled/memfs/package.json +1 -1
- package/compiled/rslog/index.js +12 -9
- package/compiled/rslog/package.json +1 -1
- package/compiled/webpack-merge/index.d.ts +31 -0
- package/compiled/webpack-merge/index.js +1200 -0
- package/compiled/webpack-merge/license +20 -0
- package/compiled/webpack-merge/package.json +1 -0
- package/dist/0~open.js +1 -1
- package/dist/{506.js → 131.js} +130 -791
- package/dist/131.js.LICENSE.txt +26 -0
- package/dist/136.mjs +42 -0
- package/dist/client/hmr.js +172 -173
- package/dist/index.cjs +106 -780
- package/dist/index.cjs.LICENSE.txt +0 -21
- package/dist/index.js +1 -1
- package/dist/rslib-runtime.js +1 -1
- package/dist/transformLoader.mjs +1 -36
- package/dist/transformRawLoader.mjs +3 -36
- package/dist-types/client/hmr.d.ts +9 -0
- package/dist-types/constants.d.ts +1 -0
- package/dist-types/helpers/vendors.d.ts +1 -0
- package/dist-types/server/assets-middleware/index.d.ts +8 -0
- package/dist-types/server/socketServer.d.ts +4 -0
- package/package.json +4 -4
- package/dist/476.mjs +0 -8
- package/dist/506.js.LICENSE.txt +0 -47
|
@@ -4,20 +4,6 @@
|
|
|
4
4
|
* MIT Licensed
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
/*!
|
|
8
|
-
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
9
|
-
*
|
|
10
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
11
|
-
* Released under the MIT License.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/*!
|
|
15
|
-
* isobject <https://github.com/jonschlinkert/isobject>
|
|
16
|
-
*
|
|
17
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
18
|
-
* Released under the MIT License.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
7
|
/*!
|
|
22
8
|
* on-finished
|
|
23
9
|
* Copyright(c) 2013 Jonathan Ong
|
|
@@ -25,13 +11,6 @@
|
|
|
25
11
|
* MIT Licensed
|
|
26
12
|
*/
|
|
27
13
|
|
|
28
|
-
/*!
|
|
29
|
-
* shallow-clone <https://github.com/jonschlinkert/shallow-clone>
|
|
30
|
-
*
|
|
31
|
-
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
32
|
-
* Released under the MIT License.
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
14
|
/**
|
|
36
15
|
* Autoload Config for PostCSS
|
|
37
16
|
*
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, createRsbuild, defaultAllowedOrigins, defineConfig, ensureAssetPrefix, loadConfig, loadEnv, logger, mergeRsbuildConfig, rspack, runCLI, version } from "./
|
|
1
|
+
export { PLUGIN_CSS_NAME, PLUGIN_SWC_NAME, createRsbuild, defaultAllowedOrigins, defineConfig, ensureAssetPrefix, loadConfig, loadEnv, logger, mergeRsbuildConfig, rspack, runCLI, version } from "./131.js";
|
package/dist/rslib-runtime.js
CHANGED
|
@@ -5,7 +5,7 @@ function __webpack_require__(moduleId) {
|
|
|
5
5
|
var module = __webpack_module_cache__[moduleId] = {
|
|
6
6
|
exports: {}
|
|
7
7
|
};
|
|
8
|
-
return __webpack_modules__[moduleId]
|
|
8
|
+
return __webpack_modules__[moduleId](module, module.exports, __webpack_require__), module.exports;
|
|
9
9
|
}
|
|
10
10
|
__webpack_require__.m = __webpack_modules__, __webpack_require__.add = function registerModules(modules) {
|
|
11
11
|
Object.assign(__webpack_require__.m, modules);
|
package/dist/transformLoader.mjs
CHANGED
|
@@ -1,36 +1 @@
|
|
|
1
|
-
|
|
2
|
-
let transformLoader = async function transform(source, map) {
|
|
3
|
-
let callback = this.async(), bypass = ()=>{
|
|
4
|
-
callback(null, source, map);
|
|
5
|
-
}, { id: transformId, getEnvironment } = this.getOptions();
|
|
6
|
-
if (!transformId) return void bypass();
|
|
7
|
-
let transform = this._compiler?.__rsbuildTransformer?.[transformId];
|
|
8
|
-
if (!transform) return void bypass();
|
|
9
|
-
try {
|
|
10
|
-
var generatedSourceMap;
|
|
11
|
-
let result = await transform({
|
|
12
|
-
code: source,
|
|
13
|
-
context: this.context,
|
|
14
|
-
resource: this.resource,
|
|
15
|
-
resourcePath: this.resourcePath,
|
|
16
|
-
resourceQuery: this.resourceQuery,
|
|
17
|
-
environment: getEnvironment(),
|
|
18
|
-
addDependency: this.addDependency.bind(this),
|
|
19
|
-
addMissingDependency: this.addMissingDependency.bind(this),
|
|
20
|
-
addContextDependency: this.addContextDependency.bind(this),
|
|
21
|
-
emitFile: this.emitFile.bind(this),
|
|
22
|
-
importModule: this.importModule.bind(this),
|
|
23
|
-
resolve: this.resolve.bind(this)
|
|
24
|
-
});
|
|
25
|
-
if (null == result) return void bypass();
|
|
26
|
-
if ('string' == typeof result || Buffer.isBuffer(result)) return void callback(null, result, map);
|
|
27
|
-
let mergedMap = (generatedSourceMap = result.map, map && generatedSourceMap ? requireCompiledPackage('@jridgewell/remapping')([
|
|
28
|
-
generatedSourceMap,
|
|
29
|
-
map
|
|
30
|
-
], ()=>null) : generatedSourceMap ?? map);
|
|
31
|
-
callback(null, result.code, mergedMap);
|
|
32
|
-
} catch (error) {
|
|
33
|
-
error instanceof Error ? callback(error) : callback(Error(String(error)));
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
export default transformLoader;
|
|
1
|
+
export { default } from "./136.mjs";
|
|
@@ -1,37 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
let
|
|
3
|
-
|
|
4
|
-
callback(null, source, map);
|
|
5
|
-
}, { id: transformId, getEnvironment } = this.getOptions();
|
|
6
|
-
if (!transformId) return void bypass();
|
|
7
|
-
let transform = this._compiler?.__rsbuildTransformer?.[transformId];
|
|
8
|
-
if (!transform) return void bypass();
|
|
9
|
-
try {
|
|
10
|
-
var generatedSourceMap;
|
|
11
|
-
let result = await transform({
|
|
12
|
-
code: source,
|
|
13
|
-
context: this.context,
|
|
14
|
-
resource: this.resource,
|
|
15
|
-
resourcePath: this.resourcePath,
|
|
16
|
-
resourceQuery: this.resourceQuery,
|
|
17
|
-
environment: getEnvironment(),
|
|
18
|
-
addDependency: this.addDependency.bind(this),
|
|
19
|
-
addMissingDependency: this.addMissingDependency.bind(this),
|
|
20
|
-
addContextDependency: this.addContextDependency.bind(this),
|
|
21
|
-
emitFile: this.emitFile.bind(this),
|
|
22
|
-
importModule: this.importModule.bind(this),
|
|
23
|
-
resolve: this.resolve.bind(this)
|
|
24
|
-
});
|
|
25
|
-
if (null == result) return void bypass();
|
|
26
|
-
if ('string' == typeof result || Buffer.isBuffer(result)) return void callback(null, result, map);
|
|
27
|
-
let mergedMap = (generatedSourceMap = result.map, map && generatedSourceMap ? requireCompiledPackage('@jridgewell/remapping')([
|
|
28
|
-
generatedSourceMap,
|
|
29
|
-
map
|
|
30
|
-
], ()=>null) : generatedSourceMap ?? map);
|
|
31
|
-
callback(null, result.code, mergedMap);
|
|
32
|
-
} catch (error) {
|
|
33
|
-
error instanceof Error ? callback(error) : callback(Error(String(error)));
|
|
34
|
-
}
|
|
35
|
-
}, raw = !0;
|
|
36
|
-
export default transformLoader;
|
|
1
|
+
import { default as loader_transformLoader } from "./136.mjs";
|
|
2
|
+
let raw = !0;
|
|
3
|
+
export default loader_transformLoader;
|
|
37
4
|
export { raw };
|
|
@@ -1 +1,10 @@
|
|
|
1
|
+
import type { NormalizedClientConfig } from '../types';
|
|
1
2
|
export declare const registerOverlay: (createFn: (html: string) => void, clearFn: () => void) => void;
|
|
3
|
+
export declare function init({ token, config, serverHost, serverPort, liveReload, browserLogs, }: {
|
|
4
|
+
token: string;
|
|
5
|
+
config: NormalizedClientConfig;
|
|
6
|
+
serverHost: string;
|
|
7
|
+
serverPort: number;
|
|
8
|
+
liveReload: boolean;
|
|
9
|
+
browserLogs: boolean;
|
|
10
|
+
}): void;
|
|
@@ -15,6 +15,7 @@ export declare const MEDIA_DIST_DIR = "static/media";
|
|
|
15
15
|
export declare const ASSETS_DIST_DIR = "static/assets";
|
|
16
16
|
export declare const LOADER_PATH: string;
|
|
17
17
|
export declare const STATIC_PATH: string;
|
|
18
|
+
export declare const CLIENT_PATH: string;
|
|
18
19
|
export declare const COMPILED_PATH: string;
|
|
19
20
|
export declare const TS_CONFIG_FILE = "tsconfig.json";
|
|
20
21
|
export declare const HMR_SOCKET_PATH = "/rsbuild-hmr";
|
|
@@ -9,6 +9,7 @@ type CompiledPackages = {
|
|
|
9
9
|
chokidar: typeof import('../../compiled/chokidar').default;
|
|
10
10
|
tinyglobby: typeof import('../../compiled/tinyglobby');
|
|
11
11
|
picocolors: typeof import('../../compiled/picocolors').default;
|
|
12
|
+
'webpack-merge': typeof import('../../compiled/webpack-merge');
|
|
12
13
|
'html-rspack-plugin': typeof import('../../compiled/html-rspack-plugin').default;
|
|
13
14
|
'http-proxy-middleware': typeof import('../../compiled/http-proxy-middleware');
|
|
14
15
|
'webpack-bundle-analyzer': typeof import('../../compiled/webpack-bundle-analyzer');
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The assets middleware is modified based on
|
|
3
|
+
* https://github.com/webpack/webpack-dev-middleware
|
|
4
|
+
*
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
* Copyright JS Foundation and other contributors
|
|
7
|
+
* https://github.com/webpack/webpack-dev-middleware/blob/master/LICENSE
|
|
8
|
+
*/
|
|
1
9
|
import type { Compiler, MultiCompiler } from '@rspack/core';
|
|
2
10
|
import type { InternalContext, NormalizedConfig, RequestHandler } from '../../types';
|
|
3
11
|
import type { SocketServer } from '../socketServer';
|
|
@@ -54,6 +54,10 @@ export declare class SocketServer {
|
|
|
54
54
|
* Send error messages to the client and render error overlay
|
|
55
55
|
*/
|
|
56
56
|
sendError(errors: Rspack.StatsError[], token: string): void;
|
|
57
|
+
/**
|
|
58
|
+
* Send warning messages to the client
|
|
59
|
+
*/
|
|
60
|
+
sendWarning(warnings: Rspack.StatsError[], token: string): void;
|
|
57
61
|
/**
|
|
58
62
|
* Write message to each socket
|
|
59
63
|
* @param message - The message to send
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.11",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.rs",
|
|
6
6
|
"bugs": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@jridgewell/remapping": "^2.3.5",
|
|
57
57
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
58
|
-
"@rslib/core": "0.18.
|
|
58
|
+
"@rslib/core": "0.18.2",
|
|
59
59
|
"@types/connect": "3.4.38",
|
|
60
60
|
"@types/cors": "^2.8.19",
|
|
61
61
|
"@types/node": "^24.10.1",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"html-rspack-plugin": "6.1.4",
|
|
75
75
|
"http-proxy-middleware": "^2.0.9",
|
|
76
76
|
"launch-editor-middleware": "^2.12.0",
|
|
77
|
-
"memfs": "^4.51.
|
|
77
|
+
"memfs": "^4.51.1",
|
|
78
78
|
"mrmime": "^2.0.1",
|
|
79
79
|
"on-finished": "2.4.1",
|
|
80
80
|
"open": "^11.0.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"prebundle": "1.6.0",
|
|
86
86
|
"range-parser": "^1.2.1",
|
|
87
87
|
"reduce-configs": "^1.1.1",
|
|
88
|
-
"rslog": "^1.3.
|
|
88
|
+
"rslog": "^1.3.2",
|
|
89
89
|
"rspack-chain": "^1.4.1",
|
|
90
90
|
"rspack-manifest-plugin": "5.2.0",
|
|
91
91
|
"sirv": "^3.0.2",
|
package/dist/476.mjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
import { dirname, join } from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
let constants_dirname = dirname(fileURLToPath(import.meta.url));
|
|
5
|
-
process.platform, join(constants_dirname), join(constants_dirname, '../static');
|
|
6
|
-
let COMPILED_PATH = join(constants_dirname, '../compiled'), vendors_require = createRequire(import.meta.url), requireCompiledPackage = (name)=>vendors_require(`${COMPILED_PATH}/${name}/index.js`);
|
|
7
|
-
requireCompiledPackage('picocolors');
|
|
8
|
-
export { requireCompiledPackage };
|
package/dist/506.js.LICENSE.txt
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* ee-first
|
|
3
|
-
* Copyright(c) 2014 Jonathan Ong
|
|
4
|
-
* MIT Licensed
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/*!
|
|
8
|
-
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
9
|
-
*
|
|
10
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
11
|
-
* Released under the MIT License.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/*!
|
|
15
|
-
* isobject <https://github.com/jonschlinkert/isobject>
|
|
16
|
-
*
|
|
17
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
18
|
-
* Released under the MIT License.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/*!
|
|
22
|
-
* on-finished
|
|
23
|
-
* Copyright(c) 2013 Jonathan Ong
|
|
24
|
-
* Copyright(c) 2014 Douglas Christopher Wilson
|
|
25
|
-
* MIT Licensed
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/*!
|
|
29
|
-
* shallow-clone <https://github.com/jonschlinkert/shallow-clone>
|
|
30
|
-
*
|
|
31
|
-
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
32
|
-
* Released under the MIT License.
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Autoload Config for PostCSS
|
|
37
|
-
*
|
|
38
|
-
* @author Michael Ciniawsky @michael-ciniawsky <michael.ciniawsky@gmail.com>
|
|
39
|
-
* @license MIT
|
|
40
|
-
*
|
|
41
|
-
* @module postcss-load-config
|
|
42
|
-
* @version 2.1.0
|
|
43
|
-
*
|
|
44
|
-
* @requires comsiconfig
|
|
45
|
-
* @requires ./options
|
|
46
|
-
* @requires ./plugins
|
|
47
|
-
*/
|