Skip to content

Commit 084bf3d

Browse files
committed
feat: use more sensible default localIdentName for css modules
1 parent 8ef70c1 commit 084bf3d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ module.exports = function createHelpers (
238238
modules: true
239239
}
240240
const OPTIONS = {
241-
localIdentName: '[hash:base64]',
241+
localIdentName: '[local]_[hash:base64:8]',
242242
importLoaders: 1
243243
}
244244
return loader.replace(/((?:^|!)css(?:-loader)?)(\?[^!]*)?/, (m, $1, $2) => {

test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ describe('vue-loader', () => {
618618
})
619619
}
620620
// default localIdentName
621-
testWithIdent(undefined, /^\w{22}/, () => {
621+
testWithIdent(undefined, /^red_\w{8}/, () => {
622622
// specified localIdentName
623623
const ident = '[path][name]---[local]---[hash:base64:5]'
624624
const regex = /css-modules---red---\w{5}/

0 commit comments

Comments
 (0)