enhanced-resolve
enhanced-resolve copied to clipboard
Question Regarding Restriction on "#/" in Imports Field Key
Hello,
I came across the following code snippet in the project and had a question about its implementation:
if (key.charCodeAt(1) === slashCode) {
throw new Error(
`Imports field key should not start with "#/" (key: ${JSON.stringify(
key
)})`
);
}
https://github.com/webpack/enhanced-resolve/blame/a1976054344a85da8e0e1b2e1611694630e8f97b/lib/util/entrypoints.js#L594-L600
Could you please explain why there is a restriction that the imports field key should not start with "#/"? I reviewed the Node.js documentation on Subpath Imports, but I didn't find any specific mention of such a limitation.
Thank you!