Use new client:visible syntax in create-astro (#633)

This commit is contained in:
Matthew Phillips 2021-07-08 14:31:05 -04:00 committed by GitHub
parent b2428b3999
commit 5570bf7958
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -152,7 +152,7 @@ export async function main() {
const componentName = path.basename(component.filename, path.extname(component.filename));
const absFileLoc = path.resolve(cwd, component.filename);
importStatements.push(`import ${componentName} from '${component.filename.replace(/^src/, '..')}';`);
components.push(`<${componentName}:visible />`);
components.push(`<${componentName} client:visible />`);
await fs.promises.writeFile(absFileLoc, component.content);
})
);