Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack.config.js的ClassnameHash没有进循环里面去 #477

Closed
yangbin1994 opened this issue Aug 3, 2017 · 1 comment
Closed

webpack.config.js的ClassnameHash没有进循环里面去 #477

yangbin1994 opened this issue Aug 3, 2017 · 1 comment

Comments

@yangbin1994
Copy link
Contributor

  if (env === 'production' && webpackConfig.module) {
    // ClassnameHash
    webpackConfig.module.rules.map((item) => {
      if (item.use && item.use[0] === 'style') {
        console.log(item)
        return item.use.map((iitem) => {
          if (iitem && iitem.loader === 'css') {
            iitem.options.localIdentName = '[hash:base64:5]'
          }
          return iitem
        })
      }
      return item
    })
  }
@superlbr
Copy link
Collaborator

后面调整过,ClassnameHash应该是可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants