Skip to content

Commit

Permalink
Alias react and react-dom with inferno-compat
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelalmeidatk committed Oct 12, 2019
1 parent cd9bdca commit fb74ebf
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions examples/using-inferno/next.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const path = require('path')

module.exports = {
webpack: function (config, { dev }) {
webpack: function(config, { dev }) {
// For the development version, we'll use React.
// Because, it support react hot loading and so on.
if (dev) {
Expand All @@ -8,9 +10,11 @@ module.exports = {

config.resolve.alias = {
...config.resolve.alias,
react: 'inferno-compat',
'react-dom': 'inferno-compat'
react: path.resolve('./lib/inferno-compat.js'),
'react-dom': path.resolve('./lib/inferno-compat.js'),
'react-dom/server': 'inferno-server',
}

return config
}
},
}

0 comments on commit fb74ebf

Please sign in to comment.