Skip to content

Commit 3b7b1f1

Browse files
authored
fix(headless-ui): update regex (#325)
1 parent 0a16588 commit 3b7b1f1

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)