Open nyngwang opened 8 months ago
I think the first one ideally should be recoverable, but might be a design limitation.
The second one probably has something to do with CSS hot reloading from css-loader
, might need to dig a bit more on how things interact ...
I found some edge cases:
<h1>something</h1>
and you want to use<h2>
instead. If you save the file in the middle of your editing, e.g. at<h2>something</h1>
, then you will get an error and that error will persist even after you finish editing by changing</h1>
to</h2>
.A.jsx
, which imports some styles, e.g.import A from './to/some.css'
, and use some of its classname, e.g.A.someClass
. Then if you clip-paste these lines fromA.jsx
to another jsx fileB.jsx
, you will have an error insisting thatA.someClass
isundefined
in the destination fileB.jsx
. The error disappears when you full-refresh/reload the webpage.I'm not sure whether the two problems are by design. It will be great if we can work around them. The first case is usually caused by the auto-save feature of an editor. The second case is very common when one wants to keep the fast-refresh feature during refactoring.
Need some guidance. @pmmmwh Thank you!
browser
package.json
screenshots
In the first case, the error looks like this:
In the second case, the error looks like this: