@@ -14,7 +14,7 @@ const WebpackConfig = require('../lib/WebpackConfig');
1414const RuntimeConfig = require ( '../lib/config/RuntimeConfig' ) ;
1515const configGenerator = require ( '../lib/config-generator' ) ;
1616const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' ) ;
17- const ManifestPlugin = require ( 'webpack-manifest-plugin' ) ;
17+ const { WebpackManifestPlugin } = require ( 'webpack-manifest-plugin' ) ;
1818const { CleanWebpackPlugin } = require ( 'clean-webpack-plugin' ) ;
1919const webpack = require ( 'webpack' ) ;
2020const path = require ( 'path' ) ;
@@ -157,10 +157,10 @@ describe('The config-generator function', () => {
157157 const actualConfig = configGenerator ( config ) ;
158158
159159 expect ( actualConfig . output . publicPath ) . to . equal ( '/build/' ) ;
160- const manifestPlugin = findPlugin ( ManifestPlugin , actualConfig . plugins ) ;
160+ const manifestPlugin = findPlugin ( WebpackManifestPlugin , actualConfig . plugins ) ;
161161 // basePath matches publicPath, *without* the opening slash
162162 // we do that by convention: keys do not start with /
163- expect ( manifestPlugin . opts . basePath ) . to . equal ( 'build/' ) ;
163+ expect ( manifestPlugin . options . basePath ) . to . equal ( 'build/' ) ;
164164 } ) ;
165165
166166 it ( 'when manifestKeyPrefix is set, that is used instead' , ( ) => {
@@ -174,10 +174,10 @@ describe('The config-generator function', () => {
174174 const actualConfig = configGenerator ( config ) ;
175175
176176 expect ( actualConfig . output . publicPath ) . to . equal ( '/subdirectory/build/' ) ;
177- const manifestPlugin = findPlugin ( ManifestPlugin , actualConfig . plugins ) ;
177+ const manifestPlugin = findPlugin ( WebpackManifestPlugin , actualConfig . plugins ) ;
178178 // base path matches manifestKeyPrefix + trailing slash
179179 // the opening slash is kept, since the user is overriding this setting
180- expect ( manifestPlugin . opts . basePath ) . to . equal ( '/build/' ) ;
180+ expect ( manifestPlugin . options . basePath ) . to . equal ( '/build/' ) ;
181181 } ) ;
182182
183183 it ( 'manifestKeyPrefix can be empty' , ( ) => {
@@ -189,8 +189,8 @@ describe('The config-generator function', () => {
189189
190190 const actualConfig = configGenerator ( config ) ;
191191
192- const manifestPlugin = findPlugin ( ManifestPlugin , actualConfig . plugins ) ;
193- expect ( manifestPlugin . opts . basePath ) . to . equal ( '' ) ;
192+ const manifestPlugin = findPlugin ( WebpackManifestPlugin , actualConfig . plugins ) ;
193+ expect ( manifestPlugin . options . basePath ) . to . equal ( '' ) ;
194194 } ) ;
195195 } ) ;
196196
0 commit comments