mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-26 10:13:59 +00:00
38 lines
929 B
JavaScript
38 lines
929 B
JavaScript
module.exports = (webpackConfig) => {
|
|
// FilenameHash
|
|
// https://webpack.js.org/configuration/output/#output-chunkfilename
|
|
webpackConfig.output.chunkFilename = '[name].[hash].js'
|
|
|
|
// ClassnameHash
|
|
// webpackConfig.module.rules.map((item) => {
|
|
// if (item.use && item.use[0] === 'style') {
|
|
// return item.use.map((iitem) => {
|
|
// if (iitem && iitem.loader === 'css') {
|
|
// iitem.options.localIdentName = '[hash:base64:5]'
|
|
// }
|
|
// return iitem
|
|
// })
|
|
// }
|
|
// return item
|
|
// })
|
|
|
|
|
|
// PreLoaders
|
|
// webpackConfig.module.preLoaders = [{
|
|
// test: /\.js$/,
|
|
// enforce: 'pre',
|
|
// loader: 'eslint',
|
|
// }]
|
|
|
|
|
|
// Alias
|
|
webpackConfig.resolve.alias = {
|
|
components: `${__dirname}/src/components`,
|
|
utils: `${__dirname}/src/utils`,
|
|
config: `${__dirname}/src/utils/config`,
|
|
enums: `${__dirname}/src/utils/enums`,
|
|
}
|
|
|
|
return webpackConfig
|
|
}
|