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+ "use strict" ;
6+
57var ExternalModuleFactoryPlugin = require ( "./ExternalModuleFactoryPlugin" ) ;
68
7- function ExternalsPlugin ( type , externals ) {
8- this . type = type ;
9- this . externals = externals ;
9+ class ExternalsPlugin {
10+ constructor ( type , externals ) {
11+ this . type = type ;
12+ this . externals = externals ;
13+ }
14+ apply ( compiler ) {
15+ compiler . plugin ( "compile" , ( params ) => {
16+ params . normalModuleFactory . apply ( new ExternalModuleFactoryPlugin ( this . type , this . externals ) ) ;
17+ } ) ;
18+ }
1019}
20+
1121module . exports = ExternalsPlugin ;
12- ExternalsPlugin . prototype . apply = function ( compiler ) {
13- compiler . plugin ( "compile" , function ( params ) {
14- params . normalModuleFactory . apply ( new ExternalModuleFactoryPlugin ( this . type , this . externals ) ) ;
15- } . bind ( this ) ) ;
16- } ;
You can’t perform that action at this time.
0 commit comments