@rsbuild/core 1.3.6 → 1.3.8
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/css-loader/index.js +18 -18
- package/compiled/html-rspack-plugin/index.js +14 -14
- package/compiled/postcss/lib/postcss.d.ts +1 -1
- package/compiled/postcss/lib/previous-map.d.ts +1 -1
- package/compiled/postcss/lib/source-map-js.d.ts +4 -0
- package/compiled/postcss-loader/index.js +6 -6
- package/compiled/rspack-manifest-plugin/index.js +4 -4
- package/compiled/webpack-bundle-analyzer/index.d.ts +1 -1
- package/dist/client/hmr.js +6 -9
- package/dist/client/overlay.js +4 -7
- package/dist/ignoreCssLoader.mjs +2 -2
- package/dist/index.cjs +84 -110
- package/dist/index.js +83 -109
- package/dist/transformLoader.mjs +3 -3
- package/dist/transformRawLoader.mjs +3 -3
- package/dist-types/config.d.ts +3 -4
- package/dist-types/types/plugin.d.ts +2 -0
- package/dist-types/types/thirdParty.d.ts +1 -0
- package/package.json +6 -6
package/dist/transformLoader.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
async function
|
|
1
|
+
async function transformLoader_transform(source, map) {
|
|
2
2
|
var _this__compiler___rsbuildTransformer, _this__compiler;
|
|
3
3
|
let callback = this.async(), bypass = ()=>callback(null, source, map), { id: transformId, getEnvironment } = this.getOptions();
|
|
4
4
|
if (!transformId) return bypass();
|
|
5
|
-
let transform = null
|
|
5
|
+
let transform = null == (_this__compiler = this._compiler) || null == (_this__compiler___rsbuildTransformer = _this__compiler.__rsbuildTransformer) ? void 0 : _this__compiler___rsbuildTransformer[transformId];
|
|
6
6
|
if (!transform) return bypass();
|
|
7
7
|
try {
|
|
8
8
|
let result = await transform({
|
|
@@ -27,4 +27,4 @@ async function transformLoader_rslib_entry_transform(source, map) {
|
|
|
27
27
|
error instanceof Error ? callback(error) : callback(Error(String(error)));
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
export {
|
|
30
|
+
export { transformLoader_transform as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
let
|
|
1
|
+
let transformRawLoader = async function(source, map) {
|
|
2
2
|
var _this__compiler___rsbuildTransformer, _this__compiler;
|
|
3
3
|
let callback = this.async(), bypass = ()=>callback(null, source, map), { id: transformId, getEnvironment } = this.getOptions();
|
|
4
4
|
if (!transformId) return bypass();
|
|
5
|
-
let transform = null
|
|
5
|
+
let transform = null == (_this__compiler = this._compiler) || null == (_this__compiler___rsbuildTransformer = _this__compiler.__rsbuildTransformer) ? void 0 : _this__compiler___rsbuildTransformer[transformId];
|
|
6
6
|
if (!transform) return bypass();
|
|
7
7
|
try {
|
|
8
8
|
let result = await transform({
|
|
@@ -27,4 +27,4 @@ let transformRawLoader_rslib_entry_ = async function(source, map) {
|
|
|
27
27
|
error instanceof Error ? callback(error) : callback(Error(String(error)));
|
|
28
28
|
}
|
|
29
29
|
}, raw = !0;
|
|
30
|
-
export {
|
|
30
|
+
export { transformRawLoader as default, raw };
|
package/dist-types/config.d.ts
CHANGED
|
@@ -8,10 +8,9 @@ import type { InspectConfigOptions, InspectConfigResult, NormalizedConfig, Plugi
|
|
|
8
8
|
export declare const LOCAL_ORIGINS_REGEX: RegExp;
|
|
9
9
|
export declare function getDefaultEntry(root: string): RsbuildEntry;
|
|
10
10
|
export declare const withDefaultConfig: (rootPath: string, config: RsbuildConfig) => Promise<RsbuildConfig>;
|
|
11
|
-
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* 3. Meaningful and can be filled by constant value.
|
|
11
|
+
/**
|
|
12
|
+
* Merges user config with default values to ensure required properties
|
|
13
|
+
* are initialized.
|
|
15
14
|
*/
|
|
16
15
|
export declare const normalizeConfig: (config: RsbuildConfig) => NormalizedConfig;
|
|
17
16
|
export type ConfigParams = {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** @ts-ignore `webpack` type only exists when `@rsbuild/webpack` is installed */
|
|
1
2
|
import type { RuleSetRule, Configuration as WebpackConfig, WebpackPluginInstance } from 'webpack';
|
|
2
3
|
import type RspackChain from '../../compiled/rspack-chain';
|
|
3
4
|
import type { ChainIdentifier } from '../configChain';
|
|
@@ -93,6 +94,7 @@ export type AsyncHook<Callback extends (...args: any[]) => T, T = any> = {
|
|
|
93
94
|
};
|
|
94
95
|
export type ModifyRspackConfigFn = (config: Rspack.Configuration, utils: ModifyRspackConfigUtils) => MaybePromise<Rspack.Configuration | void>;
|
|
95
96
|
export type ModifyWebpackChainUtils = ModifyChainUtils & {
|
|
97
|
+
/** @ts-ignore `webpack` type only exists when `@rsbuild/webpack` is installed */
|
|
96
98
|
webpack: typeof import('webpack');
|
|
97
99
|
CHAIN_ID: ChainIdentifier;
|
|
98
100
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CssExtractRspackLoaderOptions, CssExtractRspackPluginOptions } from '@rspack/core';
|
|
2
|
+
/** @ts-ignore `webpack` type only exists when `@rsbuild/webpack` is installed */
|
|
2
3
|
import type { Configuration as WebpackConfig } from 'webpack';
|
|
3
4
|
import type HtmlRspackPlugin from '../../compiled/html-rspack-plugin/index.js';
|
|
4
5
|
import type { AcceptedPlugin, ProcessOptions } from '../../compiled/postcss';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.8",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -46,17 +46,17 @@
|
|
|
46
46
|
"types.d.ts"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@rspack/core": "1.3.
|
|
49
|
+
"@rspack/core": "1.3.5",
|
|
50
50
|
"@rspack/lite-tapable": "~1.0.1",
|
|
51
|
-
"@swc/helpers": "^0.5.
|
|
51
|
+
"@swc/helpers": "^0.5.17",
|
|
52
52
|
"core-js": "~3.41.0",
|
|
53
53
|
"jiti": "^2.4.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@rslib/core": "0.6.
|
|
56
|
+
"@rslib/core": "0.6.3",
|
|
57
57
|
"@types/connect": "3.4.38",
|
|
58
58
|
"@types/cors": "^2.8.17",
|
|
59
|
-
"@types/node": "^22.14.
|
|
59
|
+
"@types/node": "^22.14.1",
|
|
60
60
|
"@types/on-finished": "2.3.4",
|
|
61
61
|
"@types/webpack-bundle-analyzer": "4.7.0",
|
|
62
62
|
"@types/ws": "^8.18.1",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"ws": "^8.18.1"
|
|
97
97
|
},
|
|
98
98
|
"engines": {
|
|
99
|
-
"node": ">=16.
|
|
99
|
+
"node": ">=16.10.0"
|
|
100
100
|
},
|
|
101
101
|
"publishConfig": {
|
|
102
102
|
"access": "public",
|