Remove the require from the web/pdfjs.js
				
					
				
			Having a `require` in this file has never made sense in e.g. the Firefox PDF Viewer and shouldn't really be necessary. Possibly the idea was to facilitate some kind of third-party bundling, however the *built* `pdf.js` file has always exposed the API-contents globally.
This commit is contained in:
		
							parent
							
								
									86a868189c
								
							
						
					
					
						commit
						bad4bfffdf
					
				
							
								
								
									
										10
									
								
								web/pdfjs.js
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								web/pdfjs.js
									
									
									
									
									
								
							| @ -12,14 +12,8 @@ | ||||
|  * See the License for the specific language governing permissions and | ||||
|  * limitations under the License. | ||||
|  */ | ||||
| /* globals module, __non_webpack_require__ */ | ||||
| /* globals module */ | ||||
| 
 | ||||
| "use strict"; | ||||
| 
 | ||||
| let pdfjsLib; | ||||
| if (typeof window !== "undefined" && window["pdfjs-dist/build/pdf"]) { | ||||
|   pdfjsLib = window["pdfjs-dist/build/pdf"]; | ||||
| } else { | ||||
|   pdfjsLib = __non_webpack_require__("../build/pdf.js"); | ||||
| } | ||||
| module.exports = pdfjsLib; | ||||
| module.exports = globalThis.pdfjsLib; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user