Reactjs Cypress错误:TypeError:webpack.ProvidePlugin在tsconfig.json中使用baseUrl时不是构造函数
我已经在cypress中为我的应用程序编写了一些测试——在我将baseUrl添加到tsconfig.json之前,一切正常。一旦我添加它,我就会得到错误:Reactjs Cypress错误:TypeError:webpack.ProvidePlugin在tsconfig.json中使用baseUrl时不是构造函数,reactjs,typescript,cypress,Reactjs,Typescript,Cypress,我已经在cypress中为我的应用程序编写了一些测试——在我将baseUrl添加到tsconfig.json之前,一切正常。一旦我添加它,我就会得到错误: The function exported by the plugins file threw an error. We invoked the function exported by C:\....\cypress\plugins\index.js, but it threw an error. TypeError: webpack.Pr
The function exported by the plugins file threw an error.
We invoked the function exported by C:\....\cypress\plugins\index.js, but it threw an error.
TypeError: webpack.ProvidePlugin is not a constructor
我想使用baseUrl,但我不确定如何解决这个问题
有什么想法吗?对于遇到同样问题的其他人来说,问题在于文件命名!我有我的webpack配置文件名“webpack.js”,Cypress似乎在找到真正的webpack之前就找到了它,并对此感到困惑。将webpack配置文件的名称更改为其他名称可以解决此问题。