fix dayjs is not excluded in dist (#6767)
							parent
							
								
									4fe57fa322
								
							
						
					
					
						commit
						37059c38fd
					
				|  | @ -14,14 +14,15 @@ function addLocales(webpackConfig) { | |||
| } | ||||
| 
 | ||||
| function externalDayjs(config) { | ||||
|   config.externals.dayjs = { | ||||
|   config.externals.push({ | ||||
|     dayjs: { | ||||
|       root: 'dayjs', | ||||
|       commonjs2: 'dayjs', | ||||
|       commonjs: 'dayjs', | ||||
|       amd: 'dayjs', | ||||
|       module: 'dayjs', | ||||
|     }, | ||||
|   }; | ||||
|   }); | ||||
|   config.externals.push(function ({ _context, request }, callback) { | ||||
|     if (/^dayjs\/plugin\//.test(request)) { | ||||
|       const name = request.replace(/\//g, '_'); | ||||
|  | @ -30,6 +31,7 @@ function externalDayjs(config) { | |||
|         commonjs2: name, | ||||
|         commonjs: name, | ||||
|         amd: name, | ||||
|         module: name, | ||||
|       }); | ||||
|     } | ||||
|     callback(); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 果冻橙
						果冻橙