Preact Router adding __source=[object Object] to all dom nodes
mrispoli24 opened this issue · 3 comments
mrispoli24 commented
cxreiff commented
I'm getting this as well.
miyacoz commented
i don't think that's due to preact-router because i also see them in my preact project though i've not added preact-router yet.
here's my dependencies in package.json:
{
"devDependencies": {
"@types/styled-components": "^5.1.15",
"eslint": "^8.3.0",
"npm-run-all": "^4.1.5",
"parcel": "^2.0.1",
"prettier": "^2.5.0",
"typescript": "^4.5.2"
},
"dependencies": {
"preact": "^10.6.1",
"recoil": "^0.5.2",
"styled-components": "^5.3.3"
}
}
developit commented
Correct - this isn't related to preact-router. It happens when you have Babel configured to transpile JSX in development mode, but have not imported preact/debug
. Something like this works in most bundlers:
if (process.env.NODE_ENV === 'development') {
require('preact/debug');
}