-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow no publicPath or entry point (#1310)
* fix(addDevServerEntrypoints): allow no entry point to be given * test(entry): ensure src is added as default if no entry specified
- Loading branch information
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
'use strict'; | ||
|
||
const assert = require('assert'); | ||
const addDevServerEntrypoints = require('../lib/util/addDevServerEntrypoints'); | ||
|
||
describe('Entry', () => { | ||
it('default to src if no entry point is given', (done) => { | ||
const webpackOptions = {}; | ||
const devServerOptions = {}; | ||
|
||
addDevServerEntrypoints(webpackOptions, devServerOptions); | ||
|
||
assert(webpackOptions.entry.length, 2); | ||
assert(webpackOptions.entry[1], './src'); | ||
|
||
done(); | ||
}); | ||
}); |