What is the problem this feature will solve?
Currently, import.meta.url gets the current file's absolute file path in URL format. This format cannot be used with node:path for creating absolute file paths.
The proposed additional properties will provide the current file's file path details in a format that can be used with node:path.
What is the feature you are proposing to solve the problem?
import.meta should provide the following additional properties:
directory
file
Example
Given the following absolute file path (on Windows):
C:\user\repos\mine\main.js
… import.meta would provide the following properties:
{
"directory" : "C:\\user\\repos\\mine\\"
"file" : "main.js"
"url" : "file:///C:/user/repos/mine/main.js"
}