Skip to content

Commit

Permalink
Fix React .d.ts files to import from valid path; fixes #1713 (#1714)
Browse files Browse the repository at this point in the history
  • Loading branch information
Coridyn committed Nov 13, 2023
1 parent 5221419 commit e786aa8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/make-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ for await (const component of components) {
const componentFile = path.join(componentDir, 'index.ts');
const importPath = component.path.replace(/\.js$/, '.component.js');
const eventImports = (component.events || [])
.map(event => `import type { ${event.eventName} } from '../../../src/events/events';`)
.map(event => `import type { ${event.eventName} } from '../../events/events';`)
.join('\n');
const eventExports = (component.events || [])
.map(event => `export type { ${event.eventName} } from '../../../src/events/events';`)
.map(event => `export type { ${event.eventName} } from '../../events/events';`)
.join('\n');
const eventNameImport = (component.events || []).length > 0 ? `import { type EventName } from '@lit/react';` : ``;
const events = (component.events || [])
Expand Down

0 comments on commit e786aa8

Please sign in to comment.