Skip to content
Snippets Groups Projects
Commit 2b3156c3 authored by Chris Beer's avatar Chris Beer
Browse files

Only add hot-loader patch in development

parent 1eb8f5f0
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ const paths = require('./config/paths'); ...@@ -5,7 +5,7 @@ const paths = require('./config/paths');
/** */ /** */
const baseConfig = mode => ({ const baseConfig = mode => ({
entry: ['react-hot-loader/patch', './src/polyfills.js', './src/index.js'], entry: ['./src/polyfills.js', './src/index.js'],
module: { module: {
rules: [ rules: [
{ {
...@@ -74,6 +74,7 @@ module.exports = (env, options) => { ...@@ -74,6 +74,7 @@ module.exports = (env, options) => {
port: 4444, port: 4444,
}, },
devtool: 'eval-source-map', devtool: 'eval-source-map',
entry: ['react-hot-loader/patch', ...baseConfig(options.mode).entry],
mode: 'development', mode: 'development',
}; };
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment