每次我编辑SCSS时,包裹都会用构建错误撞击热重载

发布于 2025-01-19 06:13:11 字数 245 浏览 4 评论 0原文

我刚刚开始使用包裹,与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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绝對不後悔。 2025-01-26 06:13:11

我通过更改VSCODE AUTOSAVE设置从“之后
延迟“焦点变更”

I was helped by changing the VSCode autosave settings from "after
delay" to "on focus change"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文