Comments (4)
Looks like this is only a problem when enabling TypeScript. Which makes sense, since TSC is pushed onto a different thread, and thus any errors are not immediately reported by Webpack. Or something like that.
I imagine the changes that Facebook made to error overlay are exactly because of this.
from create-react-wptheme.
It's not pretty, but if you use TypeScript, keep your browser's JS console open. Errors are reported there.
from create-react-wptheme.
I played with this for quite a while over the weekend, and actually the bug is much less serious than I first thought. I quite accidentally stumbled on an edge case. The error overlay works with TypeScript in most cases. The only time I noticed the overlay not work was with a React Stateless Component on which I remarked out the import * as React from "react";
line.
I'm sure there are other case, but the trick here is that the error happens on the client-side, not in Webpack/serevr-side at all. The server side does not report any problem in that scenario. But React does see the problem, and reports it to the JS console.
Create-react-app is somehow capturing these client-side errors and sending them to the Error Overlay. I'll figure out how and update my implementation of the Error Overlay to work in a similar fashion.
from create-react-wptheme.
Fixed by updating to Create-React-App v.2.1.8.
from create-react-wptheme.
Related Issues (20)
- Support for other template files HOT 3
- How do I get the post data?
- You haven't yet completed the PHP portion of your new theme's setup. Bugg ??
- static/js directory not updating
- Edit the new theme from wp editor
- Browser Refresh not working in warning state HOT 2
- Bad precaching response HOT 1
- dev server error Upgrade Required HOT 1
- Is it possible to use custom fields? Just like the ACF plugin? HOT 1
- Environment variable HOT 1
- Watch Ignore and navigation url
- prototype pollution and remote code execution HOT 1
- Update to Latest Create-React-App Version
- Router Not Working HOT 2
- Project Depreciated?
- How to do SSR with create-react-wptheme. HOT 1
- Update Webpack to use more secure hashing routines
- Featured Image HOT 2
- yarn start Fails with Open SSL message HOT 2
- Compatibility with Node 20 LTS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create-react-wptheme.