@@ -104,11 +104,10 @@ class AureliaPlugin {
104104 }
105105 if ( opts . includeAll ) {
106106 // Grab everything approach
107- compiler . apply (
108107 // This plugin ensures that everything in /src is included in the bundle.
109108 // This prevents splitting in several chunks but is super easy to use and setup,
110109 // no change in existing code or PLATFORM.nameModule() calls are required.
111- new GlobDependenciesPlugin_1 . GlobDependenciesPlugin ( { [ emptyEntryModule ] : opts . includeAll + "/**" } ) ) ;
110+ new GlobDependenciesPlugin_1 . GlobDependenciesPlugin ( { [ emptyEntryModule ] : opts . includeAll + "/**" } ) . apply ( compiler ) ;
112111 needsEmptyEntry = true ;
113112 }
114113 else if ( opts . aureliaApp ) {
@@ -122,7 +121,7 @@ class AureliaPlugin {
122121 let aureliaModules = dllRefPlugins . map ( plugin => {
123122 let content = plugin [ "options" ] . manifest . content ;
124123 return Object . keys ( content )
125- . map ( k => content [ k ] . meta [ "aurelia-id" ] )
124+ . map ( k => content [ k ] . buildMeta [ "aurelia-id" ] )
126125 . filter ( id => ! ! id ) ;
127126 } ) ;
128127 globalDependencies = globalDependencies . concat ( ...aureliaModules ) ;
@@ -140,7 +139,7 @@ class AureliaPlugin {
140139 rules . push ( { test : / \. h t m l ? $ / i, use : "aurelia-webpack-plugin/html-requires-loader" } ) ;
141140 }
142141 if ( ! opts . noInlineView ) {
143- compiler . apply ( new InlineViewDependenciesPlugin_1 . InlineViewDependenciesPlugin ( ) ) ;
142+ new InlineViewDependenciesPlugin_1 . InlineViewDependenciesPlugin ( ) . apply ( compiler ) ;
144143 }
145144 if ( globalDependencies . length > 0 ) {
146145 dependencies [ emptyEntryModule ] = globalDependencies ;
@@ -149,25 +148,24 @@ class AureliaPlugin {
149148 if ( needsEmptyEntry ) {
150149 this . addEntry ( compiler . options , emptyEntryModule ) ;
151150 }
152- compiler . apply (
153151 // Aurelia libs contain a few global defines to cut out unused features
154- new webpack_1 . DefinePlugin ( defines ) ,
152+ new webpack_1 . DefinePlugin ( defines ) . apply ( compiler ) ;
155153 // Adds some dependencies that are not documented by `PLATFORM.moduleName`
156- new ModuleDependenciesPlugin_1 . ModuleDependenciesPlugin ( dependencies ) ,
154+ new ModuleDependenciesPlugin_1 . ModuleDependenciesPlugin ( dependencies ) . apply ( compiler ) ;
157155 // This plugin traces dependencies in code that are wrapped in PLATFORM.moduleName() calls
158- new AureliaDependenciesPlugin_1 . AureliaDependenciesPlugin ( ...opts . moduleMethods ) ,
156+ new AureliaDependenciesPlugin_1 . AureliaDependenciesPlugin ( ...opts . moduleMethods ) . apply ( compiler ) ;
159157 // This plugin adds dependencies traced by html-requires-loader
160158 // Note: the config extension point for this one is html-requires-loader.attributes.
161- new HtmlDependenciesPlugin_1 . HtmlDependenciesPlugin ( ) ,
159+ new HtmlDependenciesPlugin_1 . HtmlDependenciesPlugin ( ) . apply ( compiler ) ;
162160 // This plugin looks for companion files by swapping extensions,
163161 // e.g. the view of a ViewModel. @useView and co. should use PLATFORM.moduleName().
164162 // We use it always even with `includeAll` because libs often don't `@useView` (they should).
165- new ConventionDependenciesPlugin_1 . ConventionDependenciesPlugin ( opts . viewsFor , opts . viewsExtensions ) ,
163+ new ConventionDependenciesPlugin_1 . ConventionDependenciesPlugin ( opts . viewsFor , opts . viewsExtensions ) . apply ( compiler ) ;
166164 // This plugin preserves module names for dynamic loading by aurelia-loader
167- new PreserveModuleNamePlugin_1 . PreserveModuleNamePlugin ( dllPlugin ) ,
165+ new PreserveModuleNamePlugin_1 . PreserveModuleNamePlugin ( dllPlugin ) . apply ( compiler ) ;
168166 // This plugin supports preserving specific exports names when dynamically loading modules
169167 // with aurelia-loader, while still enabling tree shaking all other exports.
170- new PreserveExportsPlugin_1 . PreserveExportsPlugin ( ) ) ;
168+ new PreserveExportsPlugin_1 . PreserveExportsPlugin ( ) . apply ( compiler ) ;
171169 }
172170 addEntry ( options , modules ) {
173171 let webpackEntry = options . entry ;
0 commit comments