大约 4 天前,我制作了一个小网站,背景中有一些粒子,可以使用 tsParticles 与鼠标光标交互。
当我今天尝试构建/运行该网站时,出现以下错误:
../node_modules/tsparticles-interaction-external-connect/esm/Connector.js 101:27
Module parse failed: Unexpected token (101:27)
You may need an appropriate loader to handle this file type.
| var container = this.container,
| mouse = container.interactivity.mouse,
> events = (particle?.interactivity ?? container.actualOptions.interactivity).events;
| if (!(events.onHover.enable && mouse.position)) {
| return false;
我实际上没有更改任何内容,没有代码,没有依赖项。
在没有改变任何东西的情况下,当我今天早上尝试运行它时,它再次工作了。