Skip to content

Commit

Permalink
fix: add client code for node-webkit target (#1942)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored May 31, 2019
1 parent cd218ef commit c6b2b1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/utils/addEntries.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ function addEntries(config, options, server) {
config.target === 'web' ||
config.target === 'webworker' ||
config.target === 'electron-renderer' ||
config.target === 'node-webkit' ||
config.target == null;
const additionalEntries = checkInject(
options.injectClient,
Expand Down
5 changes: 3 additions & 2 deletions test/Entry.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ describe('Entry', () => {
Object.assign({ target: 'web' }, config),
Object.assign({ target: 'webworker' }, config),
Object.assign({ target: 'electron-renderer' }, config),
Object.assign({ target: 'node' }, config) /* index:4 */,
Object.assign({ target: 'node-webkit' }, config),
Object.assign({ target: 'node' }, config) /* index:5 */,
];

const devServerOptions = {};
Expand All @@ -293,7 +294,7 @@ describe('Entry', () => {

// eslint-disable-next-line no-shadow
webpackOptions.forEach((webpackOptions, index) => {
const expectInline = index !== 4; /* all but the node target */
const expectInline = index !== 5; /* all but the node target */

expect(webpackOptions.entry.length).toEqual(expectInline ? 2 : 1);

Expand Down

0 comments on commit c6b2b1f

Please sign in to comment.