Skip to content

Commit 4deb88a

Browse files
authored
chore(deps): remove unnecessary rspack/core devDeps (#427)
1 parent accf40c commit 4deb88a

File tree

5 files changed

+12
-117
lines changed

5 files changed

+12
-117
lines changed

packages/core/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
},
4444
"devDependencies": {
4545
"@rslib/tsconfig": "workspace:*",
46-
"@rspack/core": "1.0.8",
4746
"@types/fs-extra": "^11.0.4",
4847
"commander": "^12.1.0",
4948
"fs-extra": "^11.2.0",

packages/core/src/css/RemoveCssExtractAssetPlugin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import type { Compiler, RspackPluginInstance } from '@rspack/core';
1+
import type { Rspack } from '@rsbuild/core';
22

33
const pluginName = 'REMOVE_CSS_EXTRACT_ASSET_PLUGIN';
44

55
type Options = {
66
include: RegExp;
77
};
88

9-
class RemoveCssExtractAssetPlugin implements RspackPluginInstance {
9+
class RemoveCssExtractAssetPlugin implements Rspack.RspackPluginInstance {
1010
readonly name: string = pluginName;
1111
options: Options;
1212
constructor(options: Options) {
1313
this.options = options;
1414
}
1515

16-
apply(compiler: Compiler): void {
16+
apply(compiler: Rspack.Compiler): void {
1717
const include = this.options.include;
1818
compiler.hooks.thisCompilation.tap(pluginName, (compilation) => {
1919
compilation.hooks.chunkAsset.tap(pluginName, (_chunk, filename) => {

packages/core/src/css/libCssExtractLoader.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* 3. add `import './[name].css';`
77
*/
88
import path, { extname } from 'node:path';
9-
import type { LoaderDefinition } from '@rspack/core';
9+
import type { Rspack } from '@rsbuild/core';
1010

1111
interface DependencyDescription {
1212
identifier: string;
@@ -35,7 +35,7 @@ function stringifyLocal(value: any) {
3535
return typeof value === 'function' ? value.toString() : JSON.stringify(value);
3636
}
3737

38-
const loader: LoaderDefinition = function loader(content) {
38+
const loader: Rspack.LoaderDefinition = function loader(content) {
3939
if (
4040
this._compiler?.options?.experiments?.css &&
4141
this._module &&
@@ -49,7 +49,11 @@ const loader: LoaderDefinition = function loader(content) {
4949
return;
5050
};
5151

52-
export const pitch: LoaderDefinition['pitch'] = function (request, _, _data) {
52+
export const pitch: Rspack.LoaderDefinition['pitch'] = function (
53+
request,
54+
_,
55+
_data,
56+
) {
5357
if (
5458
this._compiler?.options?.experiments?.css &&
5559
this._module &&

packages/core/src/plugins/entryModuleLoader.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { LoaderDefinition } from '@rspack/core';
1+
import type { Rspack } from '@rsbuild/core';
22
import {
33
REACT_DIRECTIVE_REGEX,
44
RSLIB_ENTRY_QUERY,
@@ -14,7 +14,7 @@ function splitFromFirstLine(text: string): [string, string] {
1414
return [text.slice(0, match.index), text.slice(match.index)];
1515
}
1616

17-
const loader: LoaderDefinition = function loader(source) {
17+
const loader: Rspack.LoaderDefinition = function loader(source) {
1818
let result = source;
1919

2020
if (this.resourceQuery === `?${RSLIB_ENTRY_QUERY}`) {

pnpm-lock.yaml

Lines changed: 0 additions & 108 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)