NextJS where defines tilde ‘~’ symbol in import path?

Asked By: Anonymous

I read code in an app with NextJS. It imports component like import Head from '~/components/layout/head'

The project structure:

-app
---components
---pages
---public

I wonder where defines ~ as root dir in nextJS.

Where can I find the config of this?
Tried uncover the webpack config inside next package, but didn’t find.


Solution

Answered By: Anonymous

I find this is because the babel plugin babel-plugin-root-import, since the project uses this plugin in babel config.

More about this plugin can check here.


Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen Windows 10 Lisans Office 2019 Mac Satın Al follower kaufen instagram follower kaufen porno