In Nuxt, the ~ or @ aliases are used to associate with the srcDir property, and the ~~ or @@ aliaes are used to associate with the rootDir property. For example, if you want to link an image to the /assets/ directory, you can use the ~ alias, as follows:
<template>
<img src="~/assets/sample-1.jpg"/>
</template>
On the other hand, if you want to link the image to the /static/ directory, you can use the ~ alias, as follows:
<template>
<img src="~/static/sample-1.jpg"/>
</template>
Note that you also can link your assets in the /static/ directory without these aliases:
<template>
<img src="/sample-1.jpg"/>
</template>
The value of srcDir is the same as the value of rootDir, by default, which is process.cwd(). We will cover these two options in the next section and you will learn how to change their default values. So, let&apos...