You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow on to #5368. When in EXPORT_ES6 mode import.meta.url should be used. In browsers document.currentScript will probably still work, but __dirname will not work in Node. import.meta.url is supported in both, and it's cleaner and safer.
It was just added in Firefox 62. Edge support is still lacking. Detecting its support could be tricky? I'm not sure if it will throw a syntax error in browsers which don't support it.
At the very least it's needed for Node, and supported in Node. Maybe leave browsers till later when it's reached stage 4.
It's tricky because import.meta has a special syntactic form with a keyword so unsupported browsers will throw an early SyntaxError. Waiting Stage 4 makes sense, though.
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.
Activity
saschanaz commentedon Sep 17, 2018
https://aremodulesready.com/ The availability for
import.meta.urlseems fairly limited yet 😢curiousdannii commentedon Sep 17, 2018
It was just added in Firefox 62. Edge support is still lacking. Detecting its support could be tricky? I'm not sure if it will throw a syntax error in browsers which don't support it.
At the very least it's needed for Node, and supported in Node. Maybe leave browsers till later when it's reached stage 4.
saschanaz commentedon Sep 17, 2018
It's tricky because
import.metahas a special syntactic form with a keyword so unsupported browsers will throw an early SyntaxError. Waiting Stage 4 makes sense, though.stale commentedon Sep 18, 2019
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.