diff --git a/packages/generator-one-app-module/__tests__/app.js b/packages/generator-one-app-module/__tests__/app.js index c0ee3cf6..77808c33 100644 --- a/packages/generator-one-app-module/__tests__/app.js +++ b/packages/generator-one-app-module/__tests__/app.js @@ -153,7 +153,7 @@ describe('generator-one-app-module', () => { assert.jsonFileContent('package.json', { 'one-amex': { bundler: { - externals: 'react-intl', + requiredExternals: ['react-intl'], }, }, }); @@ -221,7 +221,7 @@ describe('generator-one-app-module', () => { assert.jsonFileContent('package.json', { 'one-amex': { bundler: { - providesExternals: 'react-intl', + providedExternals: ['react-intl'], }, }, }); diff --git a/packages/generator-one-app-module/generators/app/index.js b/packages/generator-one-app-module/generators/app/index.js index e376ab10..5b7bbd8b 100644 --- a/packages/generator-one-app-module/generators/app/index.js +++ b/packages/generator-one-app-module/generators/app/index.js @@ -191,7 +191,7 @@ module.exports = class extends Generator { this.fs.extendJSON(this.destinationPath('package.json'), { 'one-amex': { bundler: { - externals: 'react-intl', + requiredExternals: ['react-intl'], }, }, }); @@ -213,7 +213,7 @@ module.exports = class extends Generator { rootModuleName: this.modulePackageName, }, bundler: { - providesExternals: 'react-intl', + providedExternals: ['react-intl'], }, }, }); diff --git a/packages/one-app-bundler/__tests__/webpack/module/webpack.server.spec.js b/packages/one-app-bundler/__tests__/webpack/module/webpack.server.spec.js index ff179a23..d6640e97 100644 --- a/packages/one-app-bundler/__tests__/webpack/module/webpack.server.spec.js +++ b/packages/one-app-bundler/__tests__/webpack/module/webpack.server.spec.js @@ -14,6 +14,10 @@ jest.spyOn(process, 'cwd').mockImplementation(() => __dirname.split('/__tests__')[0]); +jest.mock('read-pkg-up', () => ({ + sync: jest.fn(() => ({ pkg: { name: '@americanexpress/one-app-bundler', version: '6.8.0' } })), +})); + const webpackConfig = require('../../../webpack/module/webpack.server'); const { validateWebpackConfig } = require('../../../test-utils');