Skip to content

Commit ac60841

Browse files
committed
test: add failing test for match-resource url resolution
1 parent da57ee5 commit ac60841

6 files changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
body {
2+
background-image: url(static/icon.svg);
3+
}
4+
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import "./virtual.css!=!./source.txt";
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
body {
2+
background-image: url(./icon.svg);
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import yn from "../../helpers/yn";
2+
3+
module.exports = () => !yn(process.env.OLD_API);
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import Self from "../../../src";
2+
3+
module.exports = {
4+
entry: "./index.js",
5+
module: {
6+
rules: [
7+
{
8+
test: /\.css$/,
9+
use: [Self.loader, "css-loader"],
10+
},
11+
{
12+
test: /\.svg$/,
13+
issuer: /\.css$/,
14+
type: "asset/resource",
15+
generator: {
16+
filename: "static/[name][ext]",
17+
},
18+
},
19+
],
20+
},
21+
plugins: [
22+
new Self({
23+
filename: "[name].css",
24+
}),
25+
],
26+
};

0 commit comments

Comments
 (0)