Skip to content

Commit 19f0a19

Browse files
authored
Update components-registration.md
영문판의 변화내용(2895684 2019.02.25) 반영
1 parent d94dbcc commit 19f0a19

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/v2/guide/components-registration.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,11 @@ requireComponent.keys().forEach(fileName => {
215215
// 컴포넌트의 파스칼표기법 이름 가져오기
216216
const componentName = upperFirst(
217217
camelCase(
218-
// 파일이름 앞의 `./` 등 파스칼표기법 이름에 들어갈 필요없는
219-
// 기호들을 제거
220-
fileName.replace(/^\.\/(.*)\.\w+$/, '$1')
218+
// 폴더 위치와 무관하게 파일이름 추출
219+
fileName
220+
.split('/')
221+
.pop()
222+
.replace(/\.\w+$/, '')
221223
)
222224
)
223225

0 commit comments

Comments
 (0)