1 | import { pathToFileUrl, resolveDirectoryUrl } from "./urlHelpers.js"
|
2 |
|
3 | let jsenvBundlingDirectoryUrl
|
4 | if (typeof __filename === "string") {
|
5 | jsenvBundlingDirectoryUrl = resolveDirectoryUrl(
|
6 | // get ride of dist/node/main.js
|
7 | "../../",
|
8 | pathToFileUrl(__filename),
|
9 | )
|
10 | } else {
|
11 | jsenvBundlingDirectoryUrl = resolveDirectoryUrl(
|
12 | // get ride of src/jsenvBundlingDirectoryUrl.js
|
13 | "../",
|
14 | import.meta.url,
|
15 | )
|
16 | }
|
17 |
|
18 | export { jsenvBundlingDirectoryUrl }
|