[英]Yeoman webapp deploy, my json file don't work
I just create my portfolio and add the library particles.js.我只是创建了我的投资组合并添加了库particles.js。 Everything working locally but when I push (gulp build/deploy) my particles don't show.一切都在本地工作,但是当我推送(gulp 构建/部署)时,我的粒子不显示。 I check the console and get a 404 error for my particles.json.我检查了控制台并收到了我的particles.json 404 错误。
I find the answer, I put the particles.json file inside the root and I've change the src for import it.我找到了答案,我将particles.json 文件放在根目录中,并更改了src 以导入它。
particlesJS.load('particles-js', 'particles.json', function() {
});
我可以建议您将particles.json
移动到脚本目录并将其加载方式更改为:
particlesJS.load('particles-js', 'particles.json', function() {
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.