報錯信息:
Uncaught TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
出現個個問題的原因,是在引用mui中的mui.js文件時報的錯誤,由於在webpack中,采用的時嚴格模式,而mui.js用了非嚴格模式的寫法。
解決方法:1.把mui.js里面的內容改成嚴格模式,但這不可能,畢竟我們要引用他們。
2. 只能把webpack改為非嚴格模式了
安裝:
cnpm i @babel/plugin-transform-modules-commonjs @babel/plugin-transform-strict-mode -D
在.babelrc中進行配置:
"plugins": [ ["@babel/plugin-transform-modules-commonjs", { "strictMode": false }] ]
這樣就解決了。0.0