From 542f7583ed82f9ec8becccf9b9801b93a991273c Mon Sep 17 00:00:00 2001 From: konnorrogers Date: Tue, 1 Aug 2023 17:16:43 -0400 Subject: [PATCH] fix react import paths --- scripts/make-react.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/make-react.js b/scripts/make-react.js index c652baf4..d502f0b7 100644 --- a/scripts/make-react.js +++ b/scripts/make-react.js @@ -24,7 +24,7 @@ components.map(component => { const tagWithoutPrefix = component.tagName.replace(/^sl-/, ''); const componentDir = path.join(reactDir, tagWithoutPrefix); const componentFile = path.join(componentDir, 'index.ts'); - const importPath = component.path; + const importPath = component.path.split(/\.js$/)[0] + ".component.js"; const eventImports = (component.events || []) .map(event => `import { ${event.eventName} } from '../../../src/events/events';`) .join('\n');