Skip to content

Commit 4e62409

Browse files
committed
Fix styles file name
1 parent bae05f0 commit 4e62409

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/core/FileService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ export class FileService {
3232
}
3333

3434
genStyle(template: string) {
35-
const filePath = this.getFilePath(EXT.style, 'style');
35+
const filePath = this.getFilePath(EXT.style, 'styles');
3636
if (!fs.pathExistsSync(filePath)) {
3737
fs.writeFileSync(filePath, template);
3838
Logger.success(
3939
chalk =>
40-
`Successfully generated style file ${chalk.white(path.relative(APP_ROOT, filePath))}`
40+
`Successfully generated styles file ${chalk.white(path.relative(APP_ROOT, filePath))}`
4141
);
4242
} else {
4343
Logger.warn(chalk => `File already exists ${chalk.white(filePath)}`);

src/core/temlpates/components/ComponentTemplate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { generateHooks } from '../shared';
66

77
export class ComponentTemplate extends TemplateBase implements Template {
88
getStyleImportStringLiteral() {
9-
const name = `${this.vars.fileName}.styles.${this.vars.ext.style}`;
9+
const name = `./${this.vars.fileName}.styles.${this.vars.ext.style}`;
1010
return t.stringLiteral(name);
1111
}
1212

0 commit comments

Comments
 (0)