Skip to content

Commit c869f3c

Browse files
committed
chore: update
1 parent 2696bf3 commit c869f3c

File tree

7 files changed

+14
-501
lines changed

7 files changed

+14
-501
lines changed

examples/react-component-bundle-false/rslib.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default defineConfig({
3333
output: {
3434
target: 'web',
3535
assetPrefix: 'auto', // TODO: move this line to packages/core/src/asset/assetConfig.ts
36-
dataUriLimit: 4000
36+
dataUriLimit: 4000,
3737
},
3838
plugins: [pluginReact(), pluginSass()],
3939
});

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"pnpm-lock.yaml": "pnpm dedupe --check"
4141
},
4242
"devDependencies": {
43-
"@rsdoctor/rspack-plugin": "0.4.13",
4443
"@biomejs/biome": "^1.9.4",
4544
"@changesets/cli": "^2.27.11",
4645
"@types/fs-extra": "^11.0.4",

packages/core/src/asset/LibAssetExtractPlugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ class LibAssetExtractPlugin implements Rspack.RspackPluginInstance {
6565
/js$/.test(name),
6666
);
6767
const isEsmFormat = compilation.options.output.module;
68-
const canEntireFileReplacedDirectly = !this.options.bundle && !this.options.isUsingSvgr;
68+
const canEntireFileReplacedDirectly =
69+
!this.options.bundle && !this.options.isUsingSvgr;
6970
for (const name of chunkAsset) {
7071
const undoPath = getUndoPath(
7172
name,

packages/core/src/css/cssConfig.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,26 +87,26 @@ export async function cssExternalHandler(
8787
styleRedirectPath: boolean,
8888
styleRedirectExtension: boolean,
8989
redirectPath: (request: string) => Promise<string | undefined>,
90-
issuer: string
90+
issuer: string,
9191
): Promise<false | void> {
9292
// cssExtract: do not external @rsbuild/core/compiled/css-loader/noSourceMaps.js, sourceMaps.js, api.mjs etc.
9393
// cssExtract would execute the result handled by css-loader with importModule, so we cannot external the "helper import" from css-loader
9494
if (/compiled\/css-loader\//.test(request)) {
9595
return callback();
9696
}
97-
97+
9898
let resolvedRequest = request;
99-
99+
100100
if (styleRedirectPath) {
101101
const resolved = await redirectPath(resolvedRequest);
102102
if (resolved) {
103103
resolvedRequest = resolved;
104104
}
105105
}
106-
106+
107107
if (!isCssFile(resolvedRequest)) {
108108
// cssExtract: do not external assets module import
109-
if(isCssFile(issuer)) {
109+
if (isCssFile(issuer)) {
110110
return callback();
111111
}
112112
return false;

packages/core/tests/constant.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import { expect, test } from 'vitest';
2-
import { CSS_EXTENSIONS_PATTERN, DTS_EXTENSIONS_PATTERN, JS_EXTENSIONS_PATTERN } from '../src/constant';
2+
import {
3+
CSS_EXTENSIONS_PATTERN,
4+
DTS_EXTENSIONS_PATTERN,
5+
JS_EXTENSIONS_PATTERN,
6+
} from '../src/constant';
37

48
const jsTestStrings = [
59
{ str: 'index.js', expected: true },

0 commit comments

Comments
 (0)