fix extensionless imports (#1394)

This commit is contained in:
Konnor Rogers
2023-06-22 10:56:24 -04:00
committed by GitHub
parent 15f914914c
commit 60d7f688eb
174 changed files with 576 additions and 565 deletions

View File

@@ -49,7 +49,7 @@ components.map(component => {
})
);
index.push(`export { default as ${component.name} } from './${tagWithoutPrefix}';`);
index.push(`export { default as ${component.name} } from './${tagWithoutPrefix}/index.js';`);
fs.writeFileSync(componentFile, source, 'utf8');
});

View File

@@ -54,7 +54,7 @@ export default function (plop) {
type: 'modify',
path: '../../src/shoelace.ts',
pattern: /\/\* plop:component \*\//,
template: `export { default as {{ properCase tag }} } from './components/{{ tagWithoutPrefix tag }}/{{ tagWithoutPrefix tag }}';\n/* plop:component */`
template: `export { default as {{ properCase tag }} } from './components/{{ tagWithoutPrefix tag }}/{{ tagWithoutPrefix tag }}.js';\n/* plop:component */`
}
]
});

View File

@@ -1,9 +1,9 @@
import { customElement, property } from 'lit/decorators.js';
import { html } from 'lit';
import { LocalizeController } from '../../utilities/localize';
import { watch } from '../../internal/watch';
import ShoelaceElement from '../../internal/shoelace-element';
import styles from './{{ tagWithoutPrefix tag }}.styles';
import { LocalizeController } from '../../utilities/localize.js';
import { watch } from '../../internal/watch.js';
import ShoelaceElement from '../../internal/shoelace-element.js';
import styles from './{{ tagWithoutPrefix tag }}.styles.js';
import type { CSSResultGroup } from 'lit';
/**

View File

@@ -1,5 +1,5 @@
import { css } from 'lit';
import componentStyles from '../../styles/component.styles';
import componentStyles from '../../styles/component.styles.js';
export default css`
${componentStyles}