ERROR Failed to compile with 2 errors 下午3:05:22
error in ./node_modules/@interactjs/core/scope.js
Module parse failed: Unexpected token (17:5)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders| import { defaults } from './options';
| export class Scope {
> id = `__interact_scope_${Math.floor(Math.random() * 100)}`;
| isInitialized = false;
| listenerMaps = [];
npm run serve运行vue项目时出现的报错问题
解决方式:找到保存的第三方依赖包名称@interactjs。然后在vue.config.js中进行配置,配置该行代码便可解决。
transpileDependencies: ['/@interactjs']