mirror of https://github.com/webpack/webpack.git
				
				
				
			move default script type option to WebpackOptionsDefaulter
This commit is contained in:
		
							parent
							
								
									be327f9718
								
							
						
					
					
						commit
						8eb0bb675e
					
				|  | @ -29,7 +29,7 @@ class JsonpMainTemplatePlugin { | ||||||
| 			const chunkMaps = chunk.getChunkMaps(); | 			const chunkMaps = chunk.getChunkMaps(); | ||||||
| 			const crossOriginLoading = this.outputOptions.crossOriginLoading; | 			const crossOriginLoading = this.outputOptions.crossOriginLoading; | ||||||
| 			const chunkLoadTimeout = this.outputOptions.chunkLoadTimeout; | 			const chunkLoadTimeout = this.outputOptions.chunkLoadTimeout; | ||||||
| 			const jsonpScriptType = this.outputOptions.jsonpScriptType || "text/javascript"; | 			const jsonpScriptType = this.outputOptions.jsonpScriptType; | ||||||
| 			const scriptSrcPath = this.applyPluginsWaterfall("asset-path", JSON.stringify(chunkFilename), { | 			const scriptSrcPath = this.applyPluginsWaterfall("asset-path", JSON.stringify(chunkFilename), { | ||||||
| 				hash: `" + ${this.renderCurrentHashCode(hash)} + "`, | 				hash: `" + ${this.renderCurrentHashCode(hash)} + "`, | ||||||
| 				hashWithLength: length => `" + ${this.renderCurrentHashCode(hash, length)} + "`, | 				hashWithLength: length => `" + ${this.renderCurrentHashCode(hash, length)} + "`, | ||||||
|  |  | ||||||
|  | @ -61,6 +61,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { | ||||||
| 		this.set("output.hotUpdateChunkFilename", "[id].[hash].hot-update.js"); | 		this.set("output.hotUpdateChunkFilename", "[id].[hash].hot-update.js"); | ||||||
| 		this.set("output.hotUpdateMainFilename", "[hash].hot-update.json"); | 		this.set("output.hotUpdateMainFilename", "[hash].hot-update.json"); | ||||||
| 		this.set("output.crossOriginLoading", false); | 		this.set("output.crossOriginLoading", false); | ||||||
|  | 		this.set("output.jsonpScriptType", "text/javascript"); | ||||||
| 		this.set("output.chunkLoadTimeout", 120000); | 		this.set("output.chunkLoadTimeout", 120000); | ||||||
| 		this.set("output.hashFunction", "md5"); | 		this.set("output.hashFunction", "md5"); | ||||||
| 		this.set("output.hashDigest", "hex"); | 		this.set("output.hashDigest", "hex"); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue