mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
1. Align the code highlight marker color with the issue severity 2. Make the issue title colored 3. Prefix issues with `Warning` or `Error` <img width="1383" height="862" alt="Bildschirmfoto 2026-06-16 um 18 59 03" src="https://github.com/user-attachments/assets/f98c606d-4ea8-40c2-836d-e395f1df904c" /> <img width="1039" height="450" alt="Bildschirmfoto 2026-06-16 um 19 03 39" src="https://github.com/user-attachments/assets/2747f914-0587-4178-a87d-344f24715c96" /> <details> <summary>Old</summary> <img width="1267" height="745" alt="Bildschirmfoto 2026-06-16 um 17 04 35" src="https://github.com/user-attachments/assets/837739ff-82f7-4ea2-8767-ca7d866a8570" /> </details>
56 lines
1.8 KiB
TypeScript
56 lines
1.8 KiB
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
import { waitForRedbox, getRedboxSource } from 'next-test-utils'
|
|
|
|
describe('app dir - css', () => {
|
|
const { next, skipped } = nextTestSetup({
|
|
files: __dirname,
|
|
dependencies: {
|
|
sass: 'latest',
|
|
},
|
|
})
|
|
|
|
if (skipped) {
|
|
return
|
|
}
|
|
|
|
describe('sass support', () => {
|
|
;(process.env.IS_TURBOPACK_TEST ? describe : describe.skip)(
|
|
'error handling',
|
|
() => {
|
|
it('should use original source points for sass errors', async () => {
|
|
const browser = await next.browser('/sass-error')
|
|
|
|
await waitForRedbox(browser)
|
|
const source = await getRedboxSource(browser)
|
|
|
|
// css-loader does not report an error for this case
|
|
expect(source).toMatchInlineSnapshot(`
|
|
"./app/global.scss.css (45:1)
|
|
Error: Parsing CSS source code failed
|
|
43 | }
|
|
44 |
|
|
> 45 | input.defaultCheckbox::before path {
|
|
| ^
|
|
46 | fill: currentColor;
|
|
47 | }
|
|
48 |
|
|
|
|
Pseudo-elements like '::before' or '::after' can't be followed by selectors like 'Ident("path")'
|
|
|
|
Generated code of PostCSS transform of loaders [next/dist/build/webpack/loaders/resolve-url-loader/index, next/dist/compiled/sass-loader] transform of file content of app/global.scss:
|
|
./app/global.scss.css:1:884
|
|
> 1 | ...ate(-50%, 0px)}input.defaultCheckbox::before path{fill:currentColor}input:checked.defaul...
|
|
| ^
|
|
|
|
Import trace:
|
|
Client Component Browser:
|
|
./app/global.scss.css [Client Component Browser]
|
|
./app/layout.js [Client Component Browser]
|
|
./app/layout.js [Server Component]"
|
|
`)
|
|
})
|
|
}
|
|
)
|
|
})
|
|
})
|