Vue学习笔记

Vue学习笔记,第1张

报错

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "console": require.resolve("console-browserify") }'
        - install 'console-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "console": false }`

一开始以为是webpack5报错问题,一直在找webpack.config.js文件在哪
结果???阅读代码发现多了个‘console’引用

//引入组件
import MyHeader from './components/MyHeader'
import MyList from './components/MyList'
import MyFooter from './components/MyFooter'
import { timeLog } from 'console'

引用了一个无用的东西报错

总结:观察error,注意代码规范

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/943729.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-18
下一篇 2022-05-18

发表评论

登录后才能评论

评论列表(0条)

保存