mirror of
https://github.com/zuiidea/antd-admin
synced 2026-11-01 07:20:20 +00:00
add build:dll
This commit is contained in:
+15
-15
@@ -1,21 +1,22 @@
|
||||
module.exports = (webpackConfig) => {
|
||||
module.exports = (webpackConfig, env) => {
|
||||
// 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
|
||||
// })
|
||||
|
||||
if (env === 'production' && webpackConfig.module) {
|
||||
// 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 = [{
|
||||
@@ -24,7 +25,6 @@ module.exports = (webpackConfig) => {
|
||||
// loader: 'eslint',
|
||||
// }]
|
||||
|
||||
|
||||
// Alias
|
||||
webpackConfig.resolve.alias = {
|
||||
components: `${__dirname}/src/components`,
|
||||
|
||||
Reference in New Issue
Block a user