Back
See the example below:
import Component from '@/components/component'
As I notice, it behaves like ../ which goes up one level in the directory relative to the file path. Can anyone tell me what exactly does the symbol @ does?
The meaning and structure of the module identifier depend on the module loader or module bundler. You must be having babel-plugin-root-import in your webpack/babel config.
It means that it’s from the root of the project. So you don’t have to write import Component from '../../../../components/component'.
Interested in Java? Check out this Java Certification by Intellipaat.
31k questions
32.8k answers
501 comments
693 users