Skip to content

Commit 15e7c94

Browse files
authored
fix(pack): ignore invalid pseudo selector error & unpure selector error (#2303)
1 parent 951041a commit 15e7c94

10 files changed

+97
-1
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"config": {
3+
"entry": [
4+
{
5+
"import": "input/index.ts",
6+
"name": "main"
7+
}
8+
]
9+
}
10+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.rowBox {
2+
display: flex;
3+
flex-direction: row;
4+
align-items: center;
5+
margin-top: 16px;
6+
}
7+
8+
// Invalid pseudo class
9+
.rowBox:first {
10+
margin-top: 0;
11+
}
12+
13+
14+
// not pure selector
15+
img {
16+
cursor: default !important;
17+
}
18+
19+
form[id='step1'] {
20+
background: red;
21+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import style from './index.less';
2+
3+
style

crates/pack-tests/tests/snapshot/style/invalid_pseudo_class/output/38c48_pack-tests_tests_snapshot_style_invalid_pseudo_class_input_index_less_e8c3d1e8.css

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

crates/pack-tests/tests/snapshot/style/invalid_pseudo_class/output/38c48_pack-tests_tests_snapshot_style_invalid_pseudo_class_input_index_less_e8c3d1e8.css.map

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

crates/pack-tests/tests/snapshot/style/invalid_pseudo_class/output/crates_pack-tests_tests_snapshot_style_invalid_pseudo_class_input_cfc79b22.js

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

crates/pack-tests/tests/snapshot/style/invalid_pseudo_class/output/crates_pack-tests_tests_snapshot_style_invalid_pseudo_class_input_cfc79b22.js.map

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([
2+
typeof document === "object" ? document.currentScript : undefined,
3+
{"otherChunks":["38c48_pack-tests_tests_snapshot_style_invalid_pseudo_class_input_index_less_e8c3d1e8.css","crates_pack-tests_tests_snapshot_style_invalid_pseudo_class_input_cfc79b22.js"],"runtimeModuleIds":[13]}
4+
]);
5+
// Dummy runtime

crates/pack-tests/tests/snapshot/style/invalid_pseudo_class/output/main.js.map

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

0 commit comments

Comments
 (0)