didi / mpx

Mpx,一款具有优秀开发体验和深度性能优化的增强型跨端小程序框架

Home Page:https://mpxjs.cn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug report] `onLoad`, `onShow` and so on hooks not found in node_modules/@mpxjs/core/src/index.js

LikeDreamwalker opened this issue · comments

问题描述
在MPX 2.9.1引用上述钩子时会有ESLint报错not found
import mpx, { createPage, ref, computed, onLoad, onShow } from '@mpxjs/core'
该问题可通过关闭ESLint解决,不影响实际使用
image

环境信息描述
Mac OS
"@mpxjs/api-proxy": "2.9.1", "@mpxjs/babel-plugin-inject-page-events": "2.9.1", "@mpxjs/core": "2.9.1", "@mpxjs/fetch": "2.9.1", "@mpxjs/pinia": "2.9.1", "@mpxjs/size-report": "2.9.1", "@mpxjs/store": "2.9.1", "@mpxjs/utils": "2.9.1", "@mpxjs/webpack-plugin": "2.9.1"
Node.js v18.18.0
npm@9.8.1

最简复现demo
import { onLoad, onShow } from '@mpxjs/core'

请上传复现demo

mpx-cli 创建的demo项目没有复现,请上传一个可复现的demo

感谢回复