Use Preact for local development too

This commit is contained in:
kitajchuk
2021-06-11 07:33:13 -07:00
parent 1ac1554bbe
commit 24d0012134
2 changed files with 10 additions and 10 deletions

View File

@@ -1,8 +1,8 @@
module.exports = {
trailingSlash: true,
webpack: (config, { dev, isServer }) => {
// Replace React with Preact only in client production build
if (!dev && !isServer) {
// Replace React with Preact only for client
if (!isServer) {
Object.assign(config.resolve.alias, {
react: 'preact/compat',
'react-dom/test-utils': 'preact/test-utils',