Skip to content

Commit

Permalink
Vite ignore unknown import (#4527)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Aug 30, 2022
1 parent bb71be7 commit 9adb7cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/thin-taxis-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@astrojs/react": patch
---

Add vite-ignore comment to suppress unknown import warnings
2 changes: 1 addition & 1 deletion packages/integrations/react/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async function check(Component, props, children) {

async function getNodeWritable() {
let nodeStreamBuiltinModuleName = 'stream';
let { Writable } = await import(nodeStreamBuiltinModuleName);
let { Writable } = await import(/* @vite-ignore */ nodeStreamBuiltinModuleName);
return Writable;
}

Expand Down

0 comments on commit 9adb7cc

Please sign in to comment.