What is the meaning of _ import in Vue

What does the import in

Vue mean? it"s the

in the route.
May.16,2022

js syntax, the underscore indicates a local variable, so _ import means to assign the introduced module to the variable as a local variable.


import is the es6 syntax for loading modules.

after a module defines its external interface using export, other JS files can load the module through import,
for example:
a.js

export default {
a:1,
}

b.js

import _obj from 'a.js'
Menu