mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-28 20:03:57 +00:00
Filename and Classname To Hash
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
module.exports = (webpackConfig) => {
|
||||
// FilenameHash
|
||||
webpackConfig.output.chunkFilename = '[name].[hash].js' // http://webpack.github.io/docs/configuration.html#output-chunkfilename
|
||||
|
||||
// ClassnameHash
|
||||
const cssLoaderOption = {
|
||||
importLoaders: 1,
|
||||
modules: true,
|
||||
localIdentName: '[hash:base64:5]',
|
||||
}
|
||||
const cssLoaders = webpackConfig.module.loaders[3].loader.split('!')
|
||||
cssLoaders[1] = `css?${JSON.stringify(cssLoaderOption)}`
|
||||
webpackConfig.module.loaders[3].loader = cssLoaders.join('!')
|
||||
|
||||
return webpackConfig
|
||||
}
|
||||
Reference in New Issue
Block a user