Vite ignore unknown import (#4527)

This commit is contained in:
Bjorn Lu 2022-08-30 15:25:34 +08:00 committed by GitHub
parent bb71be78db
commit 9adb7cca33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
"@astrojs/react": patch
---
Add vite-ignore comment to suppress unknown import warnings

View file

@ -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;
}