Skip to content

Commit 4abce2f

Browse files
committed
Typescript index file ext fix
1 parent 2efae8d commit 4abce2f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,8 @@ function createFiles(componentName, componentPath, cssFileExt) {
8989
const isNative = reactnative || (config && config.includes('reactnative'));
9090
// File extension
9191
const ext = isTypeScript ? 'tsx' : 'js';
92-
9392
const jsxExt = 'jsx';
94-
const indexFile = `index.${ext}`;
93+
const indexFile = `index.${isTypeScript ? 'ts' : 'js'}`;
9594
let name = componentName;
9695
const isJsxFile = jsx || (config && config.includes('jsx')) || false;
9796
const componentFileName = `${name}.${isJsxFile ? jsxExt : ext}`;

0 commit comments

Comments
 (0)