Skip to content

Commit c6b2b1f

Browse files
authoredMay 31, 2019
fix: add client code for node-webkit target (#1942)
1 parent cd218ef commit c6b2b1f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

Diff for: ‎lib/utils/addEntries.js

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ function addEntries(config, options, server) {
7373
config.target === 'web' ||
7474
config.target === 'webworker' ||
7575
config.target === 'electron-renderer' ||
76+
config.target === 'node-webkit' ||
7677
config.target == null;
7778
const additionalEntries = checkInject(
7879
options.injectClient,

Diff for: ‎test/Entry.test.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ describe('Entry', () => {
284284
Object.assign({ target: 'web' }, config),
285285
Object.assign({ target: 'webworker' }, config),
286286
Object.assign({ target: 'electron-renderer' }, config),
287-
Object.assign({ target: 'node' }, config) /* index:4 */,
287+
Object.assign({ target: 'node-webkit' }, config),
288+
Object.assign({ target: 'node' }, config) /* index:5 */,
288289
];
289290

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

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

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

0 commit comments

Comments
 (0)
Please sign in to comment.