我刚刚在一些 JavaScript 导入中看到了“~/”。
这有些令人困惑,因为“~”通常表示的是
我发现唯一的答案是What is the ~ (tilde) doing in this javascript import?,它涉及到使用波浪线符号的
import { Foo, Bar, Baz } from "~/types/schema"
这有些令人困惑,因为“~”通常表示的是
$HOME
目录。但愿我能找到答案,但是我搜不到。我发现唯一的答案是What is the ~ (tilde) doing in this javascript import?,它涉及到使用波浪线符号的
import {IDispatch} from '~react-redux~redux';
,但不是在路径中使用~something
而是~/something
。