Skip to content

Commit f2d509d

Browse files
authored
Update headless-ui.ts
Change componentName clearing from prefix value. Current Regex is not working at all.
1 parent 0a16588 commit f2d509d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/resolvers/headless-ui.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function HeadlessUiResolver(options: HeadlessUiResolverOptions = {}): Com
6868
type: 'component',
6969
resolve: (name: string) => {
7070
if (name.startsWith(prefix)) {
71-
const componentName = name.replace(new RegExp(`\^\(${prefix}\)`), '')
71+
const componentName = name.substring(prefix.length)
7272
if (components.includes(componentName)) {
7373
return {
7474
importName: componentName,

0 commit comments

Comments
 (0)