Skip to content

Commit c126331

Browse files
committed
🐛 Change the prefix of the component
Signed-off-by: Rainfore <rainforest92@126.com>
1 parent 14d22e7 commit c126331

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
55
## Modifications
66

7-
- Changed `getLocalIdent` function directly to make `.root` class converted to a simple name;(This function cannot be transfered by inline query of webpack loader)
7+
- Change `getLocalIdent` function directly to make `.root` class converted to a simple name. (This function cannot be transfered by inline query of webpack loader)
8+
- Append short hash to converted name unless the component name starts with `u-`.
89

910
## Origins
1011

lib/getLocalIdent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = function getLocalIdent(loaderContext, localIdentName, localName
2020
if (!vuePath.endsWith('.vue'))
2121
vuePath = path.dirname(vuePath);
2222
var vueName = path.basename(vuePath);
23-
if (!vueName.startsWith('vi-'))
23+
if (!vueName.startsWith('u-'))
2424
localIdentName += '_[hash:base64:6]';
2525

2626
var hash = loaderUtils.interpolateName(loaderContext, localIdentName, options);

0 commit comments

Comments
 (0)