diff --git a/packages/create-vant-cli-app/src/generator.ts b/packages/create-vant-cli-app/src/generator.ts index 3052998cd..e28087d35 100644 --- a/packages/create-vant-cli-app/src/generator.ts +++ b/packages/create-vant-cli-app/src/generator.ts @@ -62,9 +62,11 @@ export class VanGenerator extends Generator { writing() { consola.info(`Creating project in ${join(CWD, this.inputs.name)}\n`); - - const templatePath = join(GENERATOR_DIR, this.inputs.vueVersion); - const templateFiles = glob.sync(join(templatePath, '**', '*'), { + /** + @see {@link https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows} + */ + const templatePath = join(GENERATOR_DIR, this.inputs.vueVersion).replace(/\\/g, '/'); + const templateFiles = glob.sync(join(templatePath, '**', '*').replace(/\\/g, '/'), { dot: true, }); const destinationRoot = this.destinationRoot();