<h2 dir="auto">Feature request</h2>
<p dir="auto"><g-emoji class="g-emoji" alias="wave" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44b.png">👋</g-emoji> I'm a developer who's been working on <a href="https://nodejs.medium.com/source-maps-in-node-js-482872b56116" rel="nofollow">adding source map support</a> to Node.js stack traces.</p>
<p dir="auto">I've noticed that webpack's source maps use special pseudo paths, which look something like this:</p>
<p dir="auto"><strong>webpack:///./index.js</strong></p>
<p dir="auto">When these source maps are loaded in Node.js, it's difficult to know what path <code class="notranslate">./index.js</code> should be resolved relative to. The specification indictes:</p>
<blockquote>
<p dir="auto">the sources are resolved relative to the SourceMap (like resolving script src in a html document).</p>
</blockquote>
<p dir="auto">Which to me would suggest <code class="notranslate">dist/index.js</code>, vs., the sources's actual location <code class="notranslate">dist/../index.js</code>.</p>





<p dir="auto"><strong>What is the expected behavior?</strong></p>
<p dir="auto">It would be nice to be able to read a variable like <code class="notranslate">sourceRoot</code>, to determine the root path of the JavaScript file prior to transpilation.</p>
<p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong></p>
<p dir="auto">Folks use webpack to create bundles of Node.js applications that are run outside of the browser, it would be nice for these people to have accurate stack traces.</p>
<p dir="auto"><strong>How should this be implemented in your opinion?</strong></p>
<p dir="auto">When specifying <code class="notranslate">--target node</code>, it would be useful if source paths either did not use the <code class="notranslate">webpack://</code> pseudo path, or if the <code class="notranslate">sourceRoot</code> variable was populated (<em>populating <code class="notranslate">sourceRoot</code> would potentially break other implementations reading the sourceMap</em>).</p>
<p dir="auto"><strong>Are you willing to work on this yourself?</strong></p>
<p dir="auto">yes</p>
<p dir="auto">Refs: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="707849640" data-permission-text="Title is private" data-url="https://github.com/nodejs/node/issues/35325" data-hovercard-type="issue" data-hovercard-url="/nodejs/node/issues/35325/hovercard" href="https://github.com/nodejs/node/issues/35325">nodejs/node#35325</a></p>
<h2 dir="auto">Feature request</h2>





<p dir="auto"><strong>What is the expected behavior?</strong><br>
Expected compiled code Use Directly native es6 module</p>
<p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong></p>
<p dir="auto">Because the browser environment supports</p>
<p dir="auto"><strong>How should this be implemented in your opinion?</strong><br>
add a option</p>
<p dir="auto"><strong>Are you willing to work on this yourself?</strong><br>
yes</p>