I'm using Preact following the "no build tools" route in the Getting Started guide. (It's a great option for these tiny demos I'm working with!)
This import statement finds something to load:
import "https://unpkg.com/preact@latest/debug/dist/debug.module.js?module";
then it dies because process is undefined.
Adding this to my document before I load my module makes it work. I think. Preact Developer Tools does connect and recognize the component.
<script>
window.process = {env: {NODE_ENV: 'development'}};
</script>
but there's some room for improvement there. Probably both in the preact/debug module build so it doesn't rely on the nodejs environment, and in the debugging guide.
I'm using Preact following the "no build tools" route in the Getting Started guide. (It's a great option for these tiny demos I'm working with!)
This import statement finds something to load:
then it dies because
processis undefined.Adding this to my document before I load my module makes it work. I think. Preact Developer Tools does connect and recognize the component.
but there's some room for improvement there. Probably both in the preact/debug module build so it doesn't rely on the nodejs environment, and in the debugging guide.