Skip to content

Commit

Permalink
Fix(Extractor Vite): Cannot read properties of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Jun 16, 2024
1 parent c3c26cc commit 1c83e52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Card from '../components/Card.astro';

<Layout title="Welcome to Astro.">
<main>
<h1 class="text:center my:12x tracking:-.015em">
<h1 class="text:center tracking:-.015em">
<span class="text-gradient mr:10">Astro</span> Master CSS
</h1>
<p class="instructions p:25!">
Expand Down
4 changes: 2 additions & 2 deletions packages/extractor.vite/src/plugins/virtual-css-hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function VirtualCSSHMRPlugin(extractor: CSSExtractor): Plugin {
const virtualCSSModule = server.moduleGraph.getModuleById(resolvedVirtualModuleId)
if (virtualCSSModule) {
server.reloadModule(virtualCSSModule)
server.hot.channels.forEach((eachChannel) => {
server.ws.clients.forEach((eachChannel) => {
eachChannel.send({
type: 'update',
updates: [{
Expand Down Expand Up @@ -100,7 +100,7 @@ export default function VirtualCSSHMRPlugin(extractor: CSSExtractor): Plugin {
updateVirtualModule()
}
server = devServer
server.hot.on('connection', () => {
server.ws.on('connection', () => {
extractor
.off('reset', resetHandler)
.on('reset', resetHandler)
Expand Down

0 comments on commit 1c83e52

Please sign in to comment.