We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc6b292 commit 2895684Copy full SHA for 2895684
src/v2/guide/components-registration.md
@@ -207,11 +207,15 @@ requireComponent.keys().forEach(fileName => {
207
// Get PascalCase name of component
208
const componentName = upperFirst(
209
camelCase(
210
- // Strip the leading `./` and extension from the filename
211
- fileName.replace(/^\.\/(.*)\.\w+$/, '$1')
+ // Gets the file name regardless of folder depth
+ fileName
212
+ .split('/')
213
+ .pop()
214
+ .replace(/\.\w+$/, '')
215
)
216
217
218
+
219
// Register component globally
220
Vue.component(
221
componentName,
0 commit comments