有没有人能够在使用root require的Javascript项目中获得goto def工作?
我有一个项目使用全局根需要包装来绕过必须使用相对路径导入,但VSCode不能很好地使用它。作为参考,WebStorm能够遵循依赖关系,但VSCode不能,所以我希望我可以在某处更新设置以启用此功能。包装器如下:
DESCRIPTION:
Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.
FIELDS:
type <string>
Used to facilitate programmatic handling of secret data.
apiVersion <string>
APIVersion defines the versioned schema of this representation of an
object. Servers should convert recognized schemas to the latest internal
value, and may reject unrecognized values. More info:
http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
data <object>
Data contains the secret data. Each key must be a valid DNS_SUBDOMAIN or
leading dot followed by valid DNS_SUBDOMAIN. The serialized form of the
secret data is a base64 encoded string, representing the arbitrary (possibly
non-string) data value here. Described in
https://tools.ietf.org/html/rfc4648#section-4
kind <string>
Kind is a string value representing the REST resource this object
represents. Servers may infer this from the endpoint the client submits
requests to. Cannot be updated. In CamelCase. More info:
http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
metadata <Object>
Standard object's metadata. More info:
http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
stringData <object>
stringData allows specifying non-binary secret data in string form. It is
provided as a write-only convenience method. All keys and values are merged
into the data field on write, overwriting any existing values. It is never
output when reading from the API.
答案 0 :(得分:0)
不,从VS Code 1.19开始,我们不支持rootRequire
。
要配置VS代码以了解相对导入路径,请尝试设置jsconfig.json
并配置"module": "system"
:
{
"compilerOptions": {
"target": "ES6",
"module": "system"
},
"exclude": [
"node_modules",
"**/node_modules/*"
]
}