Skip to content

Commit a2266fe

Browse files
committed
fix: rules
1 parent 645c27f commit a2266fe

File tree

5 files changed

+16
-15
lines changed

5 files changed

+16
-15
lines changed

rspack/loader-compat/rspack.config.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,7 @@ const config = {
110110
{
111111
test: /\.png$/,
112112
exclude: /h\.png$/,
113-
use: ({ resource, realResource, resourceQuery, compiler, issuer }) => {
114-
console.log('resource', resource);
115-
console.log('issuer', issuer);
116-
console.log('realResource', realResource);
117-
console.log('resourceQuery', resourceQuery);
118-
return [
119-
{
120-
loader: 'file-loader',
121-
},
122-
];
123-
},
113+
use: ['file-loader'],
124114
},
125115
],
126116
},

rspack/loader-compat/src/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,21 @@ import a from './a.json';
22
import b from './b.less';
33
import c from './c.scss';
44
import d from './d.yaml';
5-
import e from './e.styl';
5+
import './e.styl';
6+
import Icon from 'svg-react-loader?name=Icon!./arco.svg';
7+
import crc32 from '@node-rs/crc32';
68
import g from './g.md';
79
import h from './h.png';
810
import j from './j.txt';
911
import k from './k.ts';
1012
import l from './l.png';
1113
import { ReactComponent as Logo } from './logo.svg';
12-
import Icon from 'svg-react-loader?name=Icon!./arco.svg';
13-
import crc32 from '@node-rs/crc32';
1414

1515
console.log({
1616
a,
1717
b,
1818
c,
1919
d,
20-
e,
2120
g,
2221
h,
2322
Logo,

rspack/react-with-less/rspack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ const config = {
3535
},
3636
type: 'javascript/auto',
3737
},
38+
{
39+
test: /.css$/,
40+
type: 'css',
41+
},
3842
{
3943
test: /.less$/,
4044
loader: 'less-loader',

rspack/react-with-sass/rspack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ const config = {
3333
},
3434
type: 'javascript/auto',
3535
},
36+
{
37+
test: /.css$/,
38+
type: 'css',
39+
},
3640
{
3741
test: /\.s[ac]ss$/,
3842
loader: 'sass-loader',

rspack/vue/rspack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ const config = {
4141
},
4242
type: 'javascript/auto',
4343
},
44+
{
45+
test: /\.css$/,
46+
type: 'css',
47+
},
4448
{
4549
test: /\.less$/,
4650
loader: 'less-loader',

0 commit comments

Comments
 (0)