mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Merge pull request #57 from laskoviymishka/unshift-issue
Fix issue: entry.main.unshift is not a function Closes #56
This commit is contained in:
@@ -40,7 +40,11 @@ export function createWebpackDevServer(callback: CreateDevServerCallback, option
|
||||
// Build the final Webpack config based on supplied options
|
||||
if (enableHotModuleReplacement) {
|
||||
// TODO: Stop assuming there's an entry point called 'main'
|
||||
webpackConfig.entry['main'].unshift('webpack-hot-middleware/client');
|
||||
if (typeof webpackConfig.entry['main'] === 'string') {
|
||||
webpackConfig.entry['main'] = ['webpack-hot-middleware/client', webpackConfig.entry['main']];
|
||||
} else {
|
||||
webpackConfig.entry['main'].unshift('webpack-hot-middleware/client');
|
||||
}
|
||||
webpackConfig.plugins.push(
|
||||
new webpack.HotModuleReplacementPlugin()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user