Skip to content

Commit

Permalink
Go back to using add for HMR for apps
Browse files Browse the repository at this point in the history
  • Loading branch information
artfuldev committed Jun 12, 2017
1 parent 0cec307 commit e228378
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ module.exports = (neutrino) => {
config
.devtool('inline-source-map')
.entry('index')
.prepend(`webpack-dev-server/client?${protocol}://${host}:${port}/`)
.add(`webpack-dev-server/client?${protocol}://${host}:${port}/`)
.end();
}, config => {
neutrino.use(clean, { paths: [neutrino.options.output] });
Expand Down
4 changes: 2 additions & 2 deletions tests/ts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ test('preset development entry defaults to index.ts', t => {
const api = Neutrino();
api.use(require('..'));
const config = api.config.toConfig();
t.is(config.entry.index[1], join(api.options.source, 'index.ts'));
t.is(config.entry.index[0], join(api.options.source, 'index.ts'));
});

test('preset development entry starts with webpack-dev-server', t => {
process.env.NODE_ENV = 'development';
const api = Neutrino();
api.use(require('..'));
const config = api.config.toConfig();
t.true(config.entry.index[0].indexOf(`webpack-dev-server/client?`) === 0);
t.true(config.entry.index[1].indexOf(`webpack-dev-server/client?`) === 0);
});

test('preset production entry defaults to index.ts', t => {
Expand Down

0 comments on commit e228378

Please sign in to comment.