Skip to content

Commit

Permalink
feat: use more sensible default localIdentName for css modules
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Mar 7, 2018
1 parent 8ef70c1 commit 084bf3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ module.exports = function createHelpers (
modules: true
}
const OPTIONS = {
localIdentName: '[hash:base64]',
localIdentName: '[local]_[hash:base64:8]',
importLoaders: 1
}
return loader.replace(/((?:^|!)css(?:-loader)?)(\?[^!]*)?/, (m, $1, $2) => {
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ describe('vue-loader', () => {
})
}
// default localIdentName
testWithIdent(undefined, /^\w{22}/, () => {
testWithIdent(undefined, /^red_\w{8}/, () => {
// specified localIdentName
const ident = '[path][name]---[local]---[hash:base64:5]'
const regex = /css-modules---red---\w{5}/
Expand Down

0 comments on commit 084bf3d

Please sign in to comment.