如何将WebPack DevServer配置为代理 /图像到外部图像提供商(存储)
我需要我的webpack-dev-server
能够代理我的外部提供商(云存储)的/images/*。jpg
路径。
此:
<image src="/images/file.jpg" />
应该从:
<image src="https://firebasestorage.googleapis.com/v0/b/PROJECT_NAME.appspot.com/o/images%2Ffile.jpg?alt=media" />
obs:我也有/images
文件夹内部的云储物库中的文件夹。
I need my webpack-dev-server
to be able to proxy the /images/*.jpg
path to my external provider (Cloud Storage).
This:
<image src="/images/file.jpg" />
Should be served from:
<image src="https://firebasestorage.googleapis.com/v0/b/PROJECT_NAME.appspot.com/o/images%2Ffile.jpg?alt=media" />
Obs: I also have the /images
folder inside of my Cloud Storage Bucket.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是
webpack
配置,使我能够完成此操作:This is the
webpack
configuration that allowed me to accomplish this: