Use new client:visible syntax in create-astro (#633)
This commit is contained in:
parent
b2428b3999
commit
5570bf7958
1 changed files with 1 additions and 1 deletions
|
@ -152,7 +152,7 @@ export async function main() {
|
||||||
const componentName = path.basename(component.filename, path.extname(component.filename));
|
const componentName = path.basename(component.filename, path.extname(component.filename));
|
||||||
const absFileLoc = path.resolve(cwd, component.filename);
|
const absFileLoc = path.resolve(cwd, component.filename);
|
||||||
importStatements.push(`import ${componentName} from '${component.filename.replace(/^src/, '..')}';`);
|
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);
|
await fs.promises.writeFile(absFileLoc, component.content);
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue