mirror of https://github.com/webpack/webpack.git
				
				
				
			handle inner non-harmony dependencies correctly in ConcatenatedModule
add async as keyword fixes #5604 fixes #5615
This commit is contained in:
		
							parent
							
								
									616ce45a56
								
							
						
					
					
						commit
						af470a504e
					
				|  | @ -172,7 +172,7 @@ class ConcatenatedModule extends Module { | |||
| 		this.built = modules.some(m => m.built); | ||||
| 		this.cacheable = modules.every(m => m.cacheable); | ||||
| 		const modulesSet = new Set(modules); | ||||
| 		this.reasons = rootModule.reasons.filter(reason => !modulesSet.has(reason.module)); | ||||
| 		this.reasons = rootModule.reasons.filter(reason => !(reason.dependency instanceof HarmonyImportDependency) || !modulesSet.has(reason.module)); | ||||
| 		this.meta = rootModule.meta; | ||||
| 		this.moduleArgument = rootModule.moduleArgument; | ||||
| 		this.exportsArgument = rootModule.exportsArgument; | ||||
|  | @ -193,7 +193,7 @@ class ConcatenatedModule extends Module { | |||
| 				const m = info.module; | ||||
| 
 | ||||
| 				// populate dependencies
 | ||||
| 				m.dependencies.filter(dep => !modulesSet.has(dep.module)) | ||||
| 				m.dependencies.filter(dep => !(dep instanceof HarmonyImportDependency) || !modulesSet.has(dep.module)) | ||||
| 					.forEach(d => this.dependencies.push(d)); | ||||
| 				// populate dep warning
 | ||||
| 				m.dependenciesWarnings.forEach(depWarning => this.dependenciesWarnings.push(depWarning)); | ||||
|  | @ -450,7 +450,7 @@ class ConcatenatedModule extends Module { | |||
| 		const allUsedNames = new Set([ | ||||
| 			"__WEBPACK_MODULE_DEFAULT_EXPORT__", // avoid using this internal name
 | ||||
| 
 | ||||
| 			"abstract", "arguments", "await", "boolean", "break", "byte", "case", "catch", "char", "class", | ||||
| 			"abstract", "arguments", "async", "await", "boolean", "break", "byte", "case", "catch", "char", "class", | ||||
| 			"const", "continue", "debugger", "default", "delete", "do", "double", "else", "enum", "eval", | ||||
| 			"export", "extends", "false", "final", "finally", "float", "for", "function", "goto", "if", | ||||
| 			"implements", "import", "in", "instanceof", "int", "interface", "let", "long", "native", "new", | ||||
|  |  | |||
|  | @ -0,0 +1 @@ | |||
| export default "default"; | ||||
|  | @ -0,0 +1,5 @@ | |||
| import value from "./async"; | ||||
| 
 | ||||
| it("should have the correct values", function() { | ||||
| 	value.should.be.eql("default"); | ||||
| }); | ||||
|  | @ -0,0 +1,8 @@ | |||
| import value, { self as moduleSelf } from "./module"; | ||||
| export var self = require("./"); | ||||
| 
 | ||||
| it("should have the correct values", function() { | ||||
| 	value.should.be.eql("default"); | ||||
| 	moduleSelf.should.be.eql(self); | ||||
| 	self.self.should.be.eql(self); | ||||
| }); | ||||
|  | @ -0,0 +1,2 @@ | |||
| export default "default"; | ||||
| export var self = require("./"); | ||||
		Loading…
	
		Reference in New Issue