Introduce mui into vue project and report error 'mui' is not defined'.

introduce mui, into the vue project and then use the mui message box in js, but always report an error

clipboard.png
index.html

clipboard.png
main.js

clipboard.png
request.js

clipboard.png

ask for help ~ how to introduce guessing correctly, because it seems that this mui cannot be installed with webpack

or can the development of APP have other better UI frameworks available? are they intended to be packaged in HBUILD? will there be other effects?


you can refer to this webpack external extension (externals)
should just add

to webpack.base.conf.js.
externals: {
  mui: 'mui'
}

this error is reported by ESLint, not by webpack or the browser, it means that your code does not conform to the specification.

MUI can only be used globally if it does not support module management. At this time, you need to tell ESlint that it is a global variable and add / * global MUI * / before request.js.

in this case, you must follow the hint.
in this case, be sure to follow the hint.
in this case, be sure to follow the hint.


when I used to use mui, I put mui.js in a file and made it public through main.js
clipboard.png

clipboard.png
Menu