-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: tailwind css sourcemap warning (#7480)
- Loading branch information
1 parent
2b7dad1
commit 90df0bb
Showing
10 changed files
with
164 additions
and
9 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
packages/playground/tailwind-sourcemap/__tests__/build.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { isBuild } from 'testUtils' | ||
|
||
if (isBuild) { | ||
test('should not output sourcemap warning (#4939)', () => { | ||
serverLogs.forEach((log) => { | ||
expect(log).not.toMatch('Sourcemap is likely to be incorrect') | ||
}) | ||
}) | ||
} else { | ||
test('this file only includes test for build', () => { | ||
expect(true).toBe(true) | ||
}) | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/playground/tailwind-sourcemap/__tests__/serve.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { isBuild } from 'testUtils' | ||
|
||
if (!isBuild) { | ||
test('should not output missing source file warning', () => { | ||
serverLogs.forEach((log) => { | ||
expect(log).not.toMatch(/Sourcemap for .+ points to missing source files/) | ||
}) | ||
}) | ||
} else { | ||
test('this file only includes test for serve', () => { | ||
expect(true).toBe(true) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="wrapper"> | ||
<h1>Tailwind Sourcemap</h1> | ||
|
||
<p class="text-red-400">foo</p> | ||
</div> | ||
|
||
<script type="module"> | ||
import './tailwind.css' | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "test-tailwind-sourcemap", | ||
"private": true, | ||
"version": "0.0.0", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"debug": "node --inspect-brk ../../vite/bin/vite", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"tailwindcss": "^3.0.23" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: { config: __dirname + '/tailwind.config.js' } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
content: ['./index.html'], | ||
theme: { | ||
extend: {} | ||
}, | ||
plugins: [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* @type {import('vite').UserConfig} | ||
*/ | ||
module.exports = { | ||
css: { | ||
devSourcemap: true | ||
}, | ||
build: { | ||
sourcemap: true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.