Skip to content

Commit

Permalink
[server] Only alias react-dom in development (#1436)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars authored and bjoerge committed Aug 13, 2019
1 parent 77cd20a commit add49d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/@sanity/server/src/configs/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default config => {
}),
resolve: {
alias: Object.assign({}, baseConfig.resolve.alias, {
'react-dom': require.resolve('@hot-loader/react-dom'),
'webpack-hot-middleware/client': require.resolve('webpack-hot-middleware/client')
})
},
Expand Down
6 changes: 2 additions & 4 deletions packages/@sanity/server/src/configs/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default (config = {}) => {
resolve: {
alias: {
react: path.dirname(reactPath),
'react-dom': '@hot-loader/react-dom',
'react-dom': path.dirname(reactDomPath),
moment$: 'moment/moment.js',
...rxPaths()
}
Expand All @@ -90,9 +90,7 @@ export default (config = {}) => {
resolve('@babel/preset-react'),
[resolve('@babel/preset-env'), require('./babel-env-config')]
],
plugins: [
resolve('@babel/plugin-proposal-class-properties'),
].filter(Boolean),
plugins: [resolve('@babel/plugin-proposal-class-properties')].filter(Boolean),
cacheDirectory: true
}
}
Expand Down

0 comments on commit add49d7

Please sign in to comment.