Comments (24)
emmm 我选择 vscode
from mpvue-entry.
@kala888
WebStorm的这个问题来源于webpack配置文件,有个解法
作者的MpvueEntry是配在webpack.base.conf.js中的,会产生这个问题,
解法就是,将MpvueEntry配置到webpack.dev.conf.js和webpack.prod.conf.js中,new MpvueEntry()
这句话放在plugins的最后面,就没有这现象了
原因我不知道,也忘记是怎么发现这个解法的了
跟那个merge()函数有关?
from mpvue-entry.
vscode-languageclient 这个是什么
from mpvue-entry.
@F-loat 是vscode里eslint的一个包,问题是eslint在处理 import 的时候为什么会找到这个位置,感觉有点奇怪
from mpvue-entry.
你自己安装的吗,我没有遇到过这个问题
from mpvue-entry.
@F-loat vscode自带的,也许我新起一个项目发你看看?
from mpvue-entry.
可以,你复现下发给我
from mpvue-entry.
@F-loat 似乎。。。是我eslintrc有问题。。。打扰了
from mpvue-entry.
怎么回事,我eslint也有问题了,webstorm.
我把pages.js改名后的效果
from mpvue-entry.
运行有问题吗,没看懂这个错误和那行代码有什么关系
from mpvue-entry.
@F-loat 引入mpvue-entry后,webstorm的eslint就报错,要去找配置的那个文件
from mpvue-entry.
那个文件又不会在前端代码里引用
from mpvue-entry.
@F-loat 我也没搞明白,为啥,它要去找那个文件
from mpvue-entry.
不影响运行的话,你把这条规则禁用了吧
from mpvue-entry.
@F-loat 不影响运行。只是看起来不舒服,所有的import都会报错。
禁用没用,会出现其他的规则,一连串的规则,几乎所有跟文件有关的都会报错
跟这句话有关, entry: MpvueEntry.getEntry('src/mypages.js'),
from mpvue-entry.
mpvue-entry 是最新版的话,你传绝对路径试试
from mpvue-entry.
@F-loat 我靠,太恶心人了,好像又好了,操作就是把entry: MpvueEntry.getEntry('src/mypages.js'), 去掉,等webstorm好了以后,再加回来。。。。。然后,就好了。
from mpvue-entry.
@F-loat 其实
yarn lint也在报错
from mpvue-entry.
你换用绝对路径吧,lint 不应该检查配置文件才对
from mpvue-entry.
@F-loat 绝对路径也有问题
from mpvue-entry.
你用 https://github.com/F-loat/mpvue-quickstart 这个模板初始化一个项目,看看有错误没
from mpvue-entry.
@F-loat 报错,但是不太一样, 效果都是找不到pages。js这个文件
应该是执行lint的时候和npm run dev的时候,上下文中的跟目录不一样导致的
npm run 是再项目根目录,执行lint的时候,上下文跑到,node_modules/eslint下面去了
from mpvue-entry.
win10 下都没问题😐,mac 的话我没法调试。。你们改改看,欢迎 pr
from mpvue-entry.
@zzmark 牛逼了我的哥,确实这样可以搞定,webstorm也正常工作了,写代码一下效率提高了5行每小时。。。。
from mpvue-entry.
Related Issues (20)
- npm run dev报错 HOT 10
- 不支持最新的mpvue-loader吗 HOT 3
- main.js为什么会被打包进vendor.js呢 HOT 6
- 哥有没有适配mpvue2.0的计划 HOT 54
- 2.0.0-rc.9 保存一次,两次 Compiling... HOT 5
- 按照教程配置生成项目后,开启sourceMap发现只有components目录下文件
- 第一次构建总会报错 HOT 2
- 分包资源能否放进各子包中而不放在根目录static? HOT 2
- 能支持路由别名的? HOT 1
- 自定义路由文件夹,出现appJSON 错误 HOT 2
- 单层路径 HOT 2
- 使用Quickstart构建项目 运行报 Cannot read property 'exports' of null HOT 10
- 打包后部分页面json无usingComponents,导致页面页面引用组件不渲染 HOT 3
- 运行没问题,但是微信开发工具那边报错了 HOT 2
- uni-app能使用吗 HOT 1
- 为什么我打包后报“未找到入口 app.json 文件,或者文件读取失败,请检查后重新编译。” HOT 24
- pages/count/index.js 出现脚本错误或者未正确调用 Page() HOT 5
- app.json HOT 1
- subpackage 功能支持 微信小程序 plugin ?
- 分包资源能否放进各子包中而不放在根目录static?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpvue-entry.