Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add client code for node-webkit target #1942

Merged
merged 1 commit into from
May 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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