-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Question: how do I override the public path of assets #459
Comments
Can you say more about what you expect to happen? I don't use Webpack myself and the documentation you linked to doesn't tell me anything about what this feature does. What changes about the generated files when this setting is changed? |
react-native bundler also has a option to define a different output destination for the assets
https://github.com/react-native-community/cli/blob/master/docs/commands.md#--assets-dest-string |
The webpack build-time By default, for web bundles, webpack uses a JSONP method for dynamically loading chunks wherein In addition to chunk loading, it also used to determine paths to other assets. For example, if you are using import imgPath from "./my-image.png";
console.log(imgPath);
// https://cdn.example.com/my-image-e3087eadb38c752.png Because esbuild currently only supports ESM output when using |
Sorry for the pretty thin description, I really shouldn't create issues on my mobile. @rtsao has explained it well. The const style = require("./style.css");
console.log(style);
// style.T5D2JDNG.css If deploying this bundle to a CDN with a relative path, say |
Just for those like me stumbling across this and because the feature request is still open: here's a documented setting exactly as requested: https://esbuild.github.io/api/#public-path |
Did you use that and it's working @jhohlfeld ? |
Is there a way to set the base path for assets, similar to webpack's
publicPath
setting? (https://webpack.js.org/guides/public-path/). I can't find that option for the CLI and can't seem to find a related issue as well.The text was updated successfully, but these errors were encountered: