diff --git a/shared/web-components-vite-plugin.ts b/shared/web-components-vite-plugin.ts index 308bd39ab8f..1c27a6fec5f 100644 --- a/shared/web-components-vite-plugin.ts +++ b/shared/web-components-vite-plugin.ts @@ -22,8 +22,8 @@ export function useLocalWebComponents(webComponentsNodeModulesPath: string): Plu if (/^(@polymer|@vaadin)/.test(id)) { return this.resolve(path.join(webComponentsNodeModulesPath, id)); } - }, - } + } + }; } /** @@ -37,7 +37,10 @@ export function useLitWebComponents(): PluginOption { resolve: { alias: [ 'accordion', + 'accordion-panel', 'app-layout', + 'drawer-toggle', + 'avatar', 'avatar-group', 'context-menu', 'custom-field', @@ -45,23 +48,26 @@ export function useLitWebComponents(): PluginOption { 'dialog', 'horizontal-layout', 'list-box', + 'item', 'notification', + 'radio-button', 'radio-button-group', 'scroller', 'split-layout', 'tabs', + 'tab', + 'tabsheet', 'vertical-layout' ].flatMap((component) => { return [ { - find: new RegExp(`^@vaadin/${component}\/(src\/)?vaadin-(?!lit)`), - replacement: `@vaadin/${component}/$1vaadin-lit-` + find: new RegExp(`^@vaadin/[^\/]+\/(src\/)?vaadin-${component}.js`), + replacement: `@vaadin/[^\/]+/$1vaadin-lit-${component}.js` } - ] + ]; }) - }, - } + } + }; } - } + }; } -