Skip to content

Commit 13f339b

Browse files
committed
test: add e2e css.css-order-after-optimization
1 parent c37e244 commit 13f339b

File tree

7 files changed

+42
-0
lines changed

7 files changed

+42
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const assert = require("assert");
2+
const { parseBuildResult } = require("../../../scripts/test-utils");
3+
const { files } = parseBuildResult(__dirname);
4+
5+
const content = files["index.css"];
6+
7+
assert(
8+
content.includes(`
9+
body {
10+
color: red;
11+
}
12+
body {
13+
color: blue;
14+
}
15+
`.trim()),
16+
"css should be right after optimization"
17+
);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"minify": false,
3+
"optimization": {
4+
"concatenateModules": true
5+
}
6+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
body {
2+
color: blue;
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import './blue.css';
2+
3+
const blue = "blue";
4+
5+
export { blue }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import "./red";
2+
import "./blue";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
body {
2+
color: red;
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import "./red.css";
2+
import { blue } from "./blue";
3+
4+
const red = "red";
5+
console.log(blue + red);
6+

0 commit comments

Comments
 (0)