Disclaimer: this isn't 100% safe. Replacing react with preact/compact: // next.config.js module.exports = { webpack(config, { dev, isServer }) { // Replace React with Preact in client production build if (!dev && !isServer) { Object.assign(config.resolve.alias, { react: 'preact/compat', 'react-dom/test-utils': 'preact/test-utils', 'react-dom': 'preact/compat', }) } return config }, } I only use Pr