-
Notifications
You must be signed in to change notification settings - Fork 807
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for async style-containing vue components when extracting s…
…tyles (#2712) * Fix docblock * Extract vendor deps in integration test This tests more edge cases * Extract vue styles This ensures extracted styles work as expected * Add async component with styles This used to fail but now works with webpack 5.25.1 * Fix extraction of JSX styles
- Loading branch information
1 parent
3b06f0d
commit 9780e7e
Showing
6 changed files
with
65 additions
and
8 deletions.
There are no files selected for viewing
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
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
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
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,32 @@ | ||
<style> | ||
.async-style { | ||
color: #ff7700; | ||
} | ||
</style> | ||
<style scoped> | ||
.async-style-scoped { | ||
border: 1px solid #ff7700; | ||
} | ||
</style> | ||
|
||
<template> | ||
<div id="async-component" class="async-style async-style-scoped"> | ||
This will have an orange border and orange text. | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { onMounted } from 'vue'; | ||
export default { | ||
setup() { | ||
onMounted(() => { | ||
const style = window.getComputedStyle( | ||
document.querySelector('#async-component') | ||
); | ||
console.log(`async component style: ${style.color} ${style.borderColor}`); | ||
}); | ||
} | ||
}; | ||
</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
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