The vue project cannot introduce a custom js file?

the custom js file has a setting module.exports, which was introduced in the vue template with an error. Picture description

Dec.24,2021

https://www.cnblogs.com/fayin.
look at this


article mentions:

any file placed in static/ needs to be referenced as an absolute path: / static/ [filename]

your path is wrong.

Change the

path to '@ /.. / static/.'
if you still report an error, it means that there is an error inside the referenced file and the exposure method is not correct

Menu