每次我编辑SCSS时,包裹都会用构建错误撞击热重载
我刚刚开始使用包裹,与WebPack相比,我喜欢它。对于像我这样的人来说,简单性令人难以置信,他们不一定需要像WebPack这样的工具。
话虽如此,我在开发过程中遇到了使用它的问题。每当我将编辑器更改为SCSS文件时从字面上看,它在编译它的过程中编写它时,它以不完整的形式读取SCSS,并且失败了。
我如何防止这种情况?当我使用运行DEV服务器编辑JavaScript时,这不会发生。我知道答案可能非常明显,但是我一直无法通过搜索解决方案来找到它。
I've just started using Parcel and I love it compared to webpack. The simplicity is incredible for someone like myself who doesn't necessarily need a tool like webpack yet.
That being said, I am running into a problem with using it during development. Every time I make changes in my editor to an SCSS file, while I have a dev server running, the server crashes with a "Build Error" basically saying that "@parcel/transformer-sass: expected" correct code, but since I was literally in the process of writing it while it was compiling it, it read the SCSS in it's incomplete form and failed.
How do I prevent this? This doesn't happen while I'm editing javascript with a dev server running. I know the answer is probably incredibly obvious, but I've been unable to find it by googling around for a solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过更改VSCODE AUTOSAVE设置从“之后
延迟“焦点变更”
I was helped by changing the VSCode autosave settings from "after
delay" to "on focus change"