iview 搭建spa web应用报webpack ... @/vendors.base.js错误

ERROR in multi ./node_modules/_webpack-dev-server@2.11.2@webpack-dev-server/client?http://localhost:8080 webpack/hot/dev-server @/vendors/vendors.base.js
Module not found: Error: Can't resolve '@/vendors/vendors.base.js' in 'C:\Users\Administrator\Desktop\YuanX'
 @ multi ./node_modules/_webpack-dev-server@2.11.2@webpack-dev-server/client?http://localhost:8080 webpack/hot/dev-server @/vendors/vendors.base.js


ERROR in multi ./node_modules/_webpack-dev-server@2.11.2@webpack-dev-server/client?http://localhost:8080 webpack/hot/dev-server @/vendors/vendors.exten.js
Module not found: Error: Can't resolve '@/vendors/vendors.exten.js' in 'C:\Users\Administrator\Desktop\YuanX'

 @ multi ./node_modules/_webpack-dev-server@2.11.2@webpack-dev-server/client?http://localhost:8080 webpack/hot/dev-server @/vendors/vendors.exten.js

本人也是第一次搭建用vue 搭建iview项目,于昨天报上面这个错误,查百度于也,但未得其所以然,而后今日突然看看Git于代码也,方知其所以然,特记之。为世人以铺石之!


这个错误,看index.html

<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <title>iView admin</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
    <link rel="stylesheet" href="/dist/main.css">
    <link rel="stylesheet" name="theme" href="">
    <link rel="icon" href="./td_icon.ico" type="image/x-icon" />
</head>

<body>
    <div id="app"></div>
    <script type="text/javascript" src="/dist/vender-base.js"></script>
    <script type="text/javascript" src="/dist/vender-exten.js"></script>
    <script type="text/javascript" src="/dist/main.js"></script>
</body>

</html>

引入了/dist/vender-base.js文件 。所以问题处在这里

当我们,引入

这个三个js文件其实就是些配置,引入之后ok,webpack successfully





展开阅读全文

没有更多推荐了,返回首页