|  |  |  | /** | 
					
						
							|  |  |  |  * 开发环境构建 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | const { merge } = require('webpack-merge'); // webpack 配置合并函数 | 
					
						
							|  |  |  | const common = require('./webpack.config.common.cjs'); // webpack 通用配置 | 
					
						
							|  |  |  | const mf = require('./webpack.config.mf.cjs'); // webpack 模块联邦配置 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module.exports = merge(common, mf, { | 
					
						
							|  |  |  |   mode: 'development', | 
					
						
							|  |  |  |   // ------------------------------------------------------------------------------------------------------------------------------- | 
					
						
							|  |  |  |   // devtool        | performance                      | comment | 
					
						
							|  |  |  |   // (none)         | build:fastest, rebuild:fastest   | Recommended choice for production builds with maximum performance. | 
					
						
							|  |  |  |   // eval           | build:fast,    rebuild:fastest   | Recommended choice for development builds with maximum performance. | 
					
						
							|  |  |  |   // eval-source-map| build:slowest, rebuild:ok        | Recommended choice for development builds with high quality SourceMaps. | 
					
						
							|  |  |  |   // source-map     | build:slowest, rebuild:slowest   | Recommended choice for production builds with high quality SourceMaps. | 
					
						
							|  |  |  |   // ------------------------------------------------------------------------------------------------------------------------------- | 
					
						
							|  |  |  |   devtool: 'eval-source-map', | 
					
						
							|  |  |  |   optimization: { | 
					
						
							|  |  |  |     minimize: false, | 
					
						
							|  |  |  |     moduleIds: 'named', | 
					
						
							|  |  |  |     chunkIds: 'named', | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     splitChunks: { | 
					
						
							|  |  |  |       cacheGroups: { | 
					
						
							|  |  |  |         shared: { | 
					
						
							|  |  |  |           name: 'vue', | 
					
						
							|  |  |  |           test: /[\\/]node_modules[\\/](axios|dayjs|exceljs|file-saver|luckyexcel|mockjs|xml-formatter)[\\/]/, | 
					
						
							|  |  |  |           priority: 20, | 
					
						
							|  |  |  |           chunks: 'all', | 
					
						
							|  |  |  |           enforce: true, | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         vue: { | 
					
						
							|  |  |  |           name: 'vue', | 
					
						
							|  |  |  |           test: /[\\/]node_modules[\\/](vue|vue-dompurify-html|vue-i18n|vue-router|pinia|@vueuse[\\/]core)[\\/]/, | 
					
						
							|  |  |  |           priority: 20, | 
					
						
							|  |  |  |           chunks: 'all', | 
					
						
							|  |  |  |           enforce: true, | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         codemirror: { | 
					
						
							|  |  |  |           name: 'codemirror', | 
					
						
							|  |  |  |           test: /[\\/]node_modules[\\/](codemirror|@codemirror[\\/]autocomplete|@codemirror[\\/]commands|@codemirror[\\/]lang-html|@codemirror[\\/]lang-java|@codemirror[\\/]lang-javascript|@codemirror[\\/]lang-json|@codemirror[\\/]lang-sql|@codemirror[\\/]lang-xml|@codemirror[\\/]language|@codemirror[\\/]search|@codemirror[\\/]state|@codemirror[\\/]view)[\\/]/, | 
					
						
							|  |  |  |           priority: 20, | 
					
						
							|  |  |  |           chunks: 'all', | 
					
						
							|  |  |  |           enforce: true, | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         quasar: { | 
					
						
							|  |  |  |           name: 'quasar', | 
					
						
							|  |  |  |           test: /[\\/]node_modules[\\/](quasar|@quasar[\\/]quasar-ui-qmarkdown)[\\/]/, | 
					
						
							|  |  |  |           priority: 20, | 
					
						
							|  |  |  |           chunks: 'all', | 
					
						
							|  |  |  |           enforce: true, | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         'platform-core': { | 
					
						
							|  |  |  |           name: 'platform-core', | 
					
						
							|  |  |  |           test: /[\\/]node_modules[\\/]platform-core[\\/]/, | 
					
						
							|  |  |  |           priority: 20, | 
					
						
							|  |  |  |           chunks: 'all', | 
					
						
							|  |  |  |           enforce: true, | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         echarts: { | 
					
						
							|  |  |  |           name: 'echarts', | 
					
						
							|  |  |  |           test: /[\\/]node_modules[\\/]echarts[\\/]/, | 
					
						
							|  |  |  |           priority: 20, | 
					
						
							|  |  |  |           chunks: 'all', | 
					
						
							|  |  |  |           enforce: true, | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         maxgraph: { | 
					
						
							|  |  |  |           name: 'maxgraph', | 
					
						
							|  |  |  |           test: /[\\/]node_modules[\\/]@maxgraph[\\/]/, | 
					
						
							|  |  |  |           priority: 20, | 
					
						
							|  |  |  |           chunks: 'all', | 
					
						
							|  |  |  |           enforce: true, | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         '@univerjs': { | 
					
						
							|  |  |  |           name: '@univerjs', | 
					
						
							|  |  |  |           test: /[\\/]node_modules[\\/]@univerjs[\\/]/, | 
					
						
							|  |  |  |           priority: 20, | 
					
						
							|  |  |  |           chunks: 'all', | 
					
						
							|  |  |  |           enforce: true, | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         view: { | 
					
						
							|  |  |  |           name: 'view', | 
					
						
							|  |  |  |           test: /[\\/]view[\\/]/, | 
					
						
							|  |  |  |           priority: 20, | 
					
						
							|  |  |  |           chunks: 'all', | 
					
						
							|  |  |  |           enforce: true, | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |         vendors: { | 
					
						
							|  |  |  |           name: 'vendors', | 
					
						
							|  |  |  |           test: /[\\/]node_modules[\\/]/, | 
					
						
							|  |  |  |           chunks: 'all', | 
					
						
							|  |  |  |           enforce: true, | 
					
						
							|  |  |  |         }, | 
					
						
							|  |  |  |       }, | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  | }); |