-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source maps + publicPath #1290
Comments
It sounds to me like you need to build your app twice, once for the client and once for node, and use a different |
We are building the app twice, one esbuild build for the node server and one esbuild build for the browser code. But we are sharing some options between both ( An example is something like: import * as React from 'react';
import imageSrc from './image.png';
function MyApp() {
return <img src={imageSrc} />
} If you want to do server and client rendering for this component, you expect Unrelated to this specific example, it's currently not obvious that the |
Hi, also have related question about resolving absolute, not relative path for similar case.
When I am using Is there the way to configure it as absolute path, to get |
I have same issue, an option or way to ensure absolute path from '/' instead of relative from source to the asset. |
When bundling a node.js app which is referencing some assets that are also used on the client side (ex: sir), we use
publicPath
to ensure the same absolute urls are referenced everywhere.The issue is when using this option in combinaison of
sourcemap: true
, the reference to the source map file in the JS code is then an absolute url prefixed bypublicPath
.Prefixing the
sourceMappingURL
with thepublicPath
makes sense for a browser application, but prevent the combinaison ofpublicPath
+sourceMap
for node apps.It'd be great if there was an optional
sourceMapPublicPath
url to override this where the option passed could besourceMapPublicPath: ./
to indicate to use a relative file path insourceMappingURL
.The text was updated successfully, but these errors were encountered: