File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 MIT License http://www.opensource.org/licenses/mit-license.php
33 Author Tobias Koppers @sokra
44*/
5- var JsonpMainTemplatePlugin = require ( "./JsonpMainTemplatePlugin" ) ;
6- var JsonpChunkTemplatePlugin = require ( "./JsonpChunkTemplatePlugin" ) ;
7- var JsonpHotUpdateChunkTemplatePlugin = require ( "./JsonpHotUpdateChunkTemplatePlugin" ) ;
5+ "use strict" ;
6+
7+ const JsonpMainTemplatePlugin = require ( "./JsonpMainTemplatePlugin" ) ;
8+ const JsonpChunkTemplatePlugin = require ( "./JsonpChunkTemplatePlugin" ) ;
9+ const JsonpHotUpdateChunkTemplatePlugin = require ( "./JsonpHotUpdateChunkTemplatePlugin" ) ;
10+
11+ class JsonpTemplatePlugin {
12+ apply ( compiler ) {
13+ compiler . plugin ( "this-compilation" , ( compilation ) => {
14+ compilation . mainTemplate . apply ( new JsonpMainTemplatePlugin ( ) ) ;
15+ compilation . chunkTemplate . apply ( new JsonpChunkTemplatePlugin ( ) ) ;
16+ compilation . hotUpdateChunkTemplate . apply ( new JsonpHotUpdateChunkTemplatePlugin ( ) ) ;
17+ } ) ;
18+ }
19+ }
820
9- function JsonpTemplatePlugin ( ) { }
1021module . exports = JsonpTemplatePlugin ;
11- JsonpTemplatePlugin . prototype . apply = function ( compiler ) {
12- compiler . plugin ( "this-compilation" , function ( compilation ) {
13- compilation . mainTemplate . apply ( new JsonpMainTemplatePlugin ( ) ) ;
14- compilation . chunkTemplate . apply ( new JsonpChunkTemplatePlugin ( ) ) ;
15- compilation . hotUpdateChunkTemplate . apply ( new JsonpHotUpdateChunkTemplatePlugin ( ) ) ;
16- } ) ;
17- } ;
You can’t perform that action at this time.
0 commit comments