You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Style Guide: Base component names example (#2449)
Webpack `require.context` matches file relative path.
For example: `['./BaseXXX.vue', './BaseYYY.vue']`, the path starts with './'
regex `/^Base/` will get empty result.
Copy file name to clipboardExpand all lines: src/v2/style-guide/index.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -774,7 +774,7 @@ Some advantages of this convention:
774
774
- Since these components are so frequently used, you may want to simply make them global instead of importing them everywhere. A prefix makes this possible with Webpack:
775
775
776
776
```js
777
-
var requireComponent =require.context("./src", true,/^Base[A-Z]/)
777
+
var requireComponent =require.context("./src", true,/Base[A-Z]\w+\.(vue|js)$/)
0 commit comments