mirror of https://github.com/alibaba/ice.git
				
				
				
			Fix: resolve path of regenerator-runtime (#6742)
* fix: resolve path of regenerator-runtime * chore: update defineVitestConfig.test.ts * chore: update defineJestConfig.test.ts
This commit is contained in:
		
							parent
							
								
									c06cb97806
								
							
						
					
					
						commit
						41be253aa9
					
				|  | @ -0,0 +1,5 @@ | |||
| --- | ||||
| '@ice/app': patch | ||||
| --- | ||||
| 
 | ||||
| fix: resolve path of regenerator-runtime/runtime.js | ||||
|  | @ -9,6 +9,7 @@ const getDefaultTaskConfig = ({ rootDir, command }): Config => { | |||
|   const defaultLogging = command === 'start' ? 'summary' : 'summary assets'; | ||||
| 
 | ||||
|   const envReplacement = path.join(rootDir, RUNTIME_TMP_DIR, 'env.ts'); | ||||
|   const regeneratorRuntimePath = require.resolve('regenerator-runtime'); | ||||
|   return { | ||||
|     mode: command === 'start' ? 'development' : 'production', | ||||
|     sourceMap: command === 'start' ? 'cheap-module-source-map' : false, | ||||
|  | @ -21,7 +22,8 @@ const getDefaultTaskConfig = ({ rootDir, command }): Config => { | |||
|       'webpack/hot': '@ice/bundles/compiled/webpack/hot', | ||||
|       // Get absolute path of `regenerator-runtime`, `@swc/helpers`
 | ||||
|       // so it's unnecessary to add it to project dependencies.
 | ||||
|       'regenerator-runtime': require.resolve('regenerator-runtime'), | ||||
|       'regenerator-runtime/runtime.js': regeneratorRuntimePath, | ||||
|       'regenerator-runtime': regeneratorRuntimePath, | ||||
|       '@swc/helpers': path.dirname(require.resolve('@swc/helpers/package.json')), | ||||
|       'universal-env': envReplacement, | ||||
|       '@uni/env': envReplacement, | ||||
|  |  | |||
|  | @ -11,6 +11,7 @@ describe('defineJestConfig', () => { | |||
|     '^ice/types', | ||||
|     '^@/(.*)', | ||||
|     '^webpack/hot', | ||||
|     '^regenerator-runtime/runtime.js', | ||||
|     '^regenerator-runtime', | ||||
|     '^@swc/helpers/(.*)', | ||||
|     '^universal-env', | ||||
|  |  | |||
|  | @ -11,6 +11,7 @@ describe('defineVitestConfig', () => { | |||
|     'ice/types', | ||||
|     '@', | ||||
|     'webpack/hot', | ||||
|     'regenerator-runtime/runtime.js', | ||||
|     'regenerator-runtime', | ||||
|     '@swc/helpers', | ||||
|     'universal-env', | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue