# Class JsonpScriptSrcPlugin

This plugin modifies the webpack bootstrap code generated by the plugin at webpack/lib/web/JsonpMainTemplatePlugin.js

It will rename the function jsonpScriptSrc generated by that to webpackJsonpScriptSrc and install a new version that check a user provided function for a custom src.

window.webpack_get_script_src(chunkId, publicPath, originalSrc)

This is only for webpack 4 (tested with 4.43 and 4.44).

Webpack 5 has official support for this https://github.com/webpack/webpack/pull/8462 so it won't be necessary.

- Defined in plugins/jsonp-script-src-plugin.ts:18

#####
Index

### Constructors

constructor

### Methods

_applyMainTemplate
apply

## Constructors

### constructor

- new JsonpScriptSrcPlugin(): JsonpScriptSrcPlugin

- #### Returns JsonpScriptSrcPlugin

  - Defined in plugins/jsonp-script-src-plugin.ts:19

## Methods

### _applyMainTemplate

- _applyMainTemplate(mainTemplate): void

- #### Parameters

  - mainTemplate: any

  #### Returns void

  - Defined in plugins/jsonp-script-src-plugin.ts:23

### apply

- apply(compiler): void

- #### Parameters

  - compiler: any

  #### Returns void

  - Defined in plugins/jsonp-script-src-plugin.ts:69