Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 084bf3d

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

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed

‎lib/helpers.js

Copy file name to clipboardExpand all lines: lib/helpers.js
+1-1Lines 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

Copy file name to clipboardExpand all lines: test/test.js
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.