Skip to content

Commit

Permalink
Back out use of preact/debug in favour of preact/devtools
Browse files Browse the repository at this point in the history
This fails due to Webpack enforcing read-only ES module exports
  • Loading branch information
insin committed Nov 8, 2017
1 parent 522b1cc commit 6aea316
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Fixed

- Backed out use of `preact/debug` in favour of `preact/devtools`, as the debug module tries to override the preact module's render export, which fails due to Webpack enforcing the read-only nature of ES module exports.

# 0.19.1 / 2017-11-04

## `nwb.config.js` Config Changes
Expand Down
4 changes: 2 additions & 2 deletions src/preact/renderShim.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ let root = parent.firstChild // If #app already contains elements, hydrate from
let vnode = null

if (process.env.NODE_ENV === 'development') {
// Enable Preact debug output and use of React Developer Tools
require('preact/debug')
// Enable use of React Developer Tools
require('preact/devtools')
}

function renderEntry(exported) {
Expand Down
4 changes: 2 additions & 2 deletions templates/preact-app/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import './index.css'
import {h, render} from 'preact'

if (process.env.NODE_ENV === 'development') {
// Enable Preact debug output and use of React Developer Tools
require('preact/debug')
// Enable use of React Developer Tools
require('preact/devtools')
}

let root
Expand Down

0 comments on commit 6aea316

Please sign in to comment.