暗黑模式
js
// vite.config.mts
console.log("[__dirname]", __dirname);
console.log("[__filename]", __filename);
console.log("[meta.url]", import.meta.url);
console.log("[meta.dirname]", import.meta.dirname);
console.log("[meta.filename]", import.meta.filename);
1
2
3
4
5
6
2
3
4
5
6
print:
bash
[__dirname] /home/ronnie/workspace/st/zm-mdd-console
[__filename] /home/ronnie/workspace/st/zm-mdd-console/vite.config.mts
[meta.url] file:///home/ronnie/workspace/st/zm-mdd-console/vite.config.mts
[meta.dirname] /home/ronnie/workspace/st/zm-mdd-console
[meta.filename] /home/ronnie/workspace/st/zm-mdd-console/vite.config.mts
1
2
3
4
5
2
3
4
5