Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/379.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在grunt任务中将CDN url前置到所有图像引用_Javascript_Gruntjs_Grunt Usemin - Fatal编程技术网

Javascript 在grunt任务中将CDN url前置到所有图像引用

Javascript 在grunt任务中将CDN url前置到所有图像引用,javascript,gruntjs,grunt-usemin,Javascript,Gruntjs,Grunt Usemin,我使用默认的grunt构建,它在源代码中将所有图像引用替换为name+hash。 这是当我把所有的图片都放在index.html的同一个位置时 现在我需要使用CDN来存储图像。我用于将我的/images文件夹中的所有图像上载到CDN 但是我如何用我的CDN URL预先设置所有图像名称引用

我使用默认的grunt构建,它在源代码中将所有图像引用替换为name+hash。 这是当我把所有的图片都放在index.html的同一个位置时

现在我需要使用CDN来存储图像。我用于将我的/images文件夹中的所有图像上载到CDN

但是我如何用我的CDN URL预先设置所有图像名称引用