Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
fix(generator): react-intl in externals (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
infoxicator authored Aug 10, 2020
1 parent 764c44d commit ee5a759
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/generator-one-app-module/__tests__/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ describe('generator-one-app-module', () => {
assert.jsonFileContent('package.json', {
'one-amex': {
bundler: {
externals: 'react-intl',
requiredExternals: ['react-intl'],
},
},
});
Expand Down Expand Up @@ -221,7 +221,7 @@ describe('generator-one-app-module', () => {
assert.jsonFileContent('package.json', {
'one-amex': {
bundler: {
providesExternals: 'react-intl',
providedExternals: ['react-intl'],
},
},
});
Expand Down
4 changes: 2 additions & 2 deletions packages/generator-one-app-module/generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
},
},
});
Expand All @@ -213,7 +213,7 @@ module.exports = class extends Generator {
rootModuleName: this.modulePackageName,
},
bundler: {
providesExternals: 'react-intl',
providedExternals: ['react-intl'],
},
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down

0 comments on commit ee5a759

Please sign in to comment.