rsnext/examples/using-preact/next.config.js
2017-07-09 13:52:35 +02:00

16 lines
376 B
JavaScript

module.exports = {
webpack: function (config, { dev }) {
// For the development version, we'll use React.
// Because, it supports react hot loading and so on.
if (dev) {
return config
}
config.resolve.alias = {
'react': 'preact-compat/dist/preact-compat',
'react-dom': 'preact-compat/dist/preact-compat'
}
return config
}
}