I am new to VueJS. I am following one of the YouTube tutorial Let's Build a Multi-Purpose Laravel + Vue Application by Code Inspire

This is his github package. https://github.com/Hujjat/laravStart

我注意到了.当我注销并再次登录时,它将重定向到.js文件.

就我而言:-

我克隆了他的项目.我try 了判断,我登录,注销,再登录.它将重定向到 http://laravstart.test/js/laravel-vue-pagination.common.js.map

It will show 404 error. I have every time remove the /js/xxxx.js.map then only back to normal. enter image description here

我的两个项目,当我运行判断时.我注意到有Chrome警告.

DevTools failed to parse SourceMap: http://laravstart.test/js/laravel-vue-pagination.common.js.map

DevTools failed to parse SourceMap: http://laravel-vuejs.test/js/laravel-js/popper.js.map

IMPORTANT NOTE It only happen when I open the chrome inspect windows. If I close it, it will back to normal means won't redirect to JS file.

屏幕记录:https://imgur.com/gZzcX5L

I tested with Chrome and Firefox with inspect both having the same problem.

但在Chrome中,如果我关闭源 map 的设置,它就不会有这个问题.

enter image description here

有人知道怎么修吗?编译源 map 问题?js.映射文件不存在.

推荐答案

我发现一个解决方案是在public/js/popper.js.map创建一个虚拟文件,然后它会恢复正常,基本上只是满足浏览器开发工具所需的,它不会重定向到特定的文件.

I believe this is browser developer tools behaviour.

I received solution from the laraStart repo owner.

This error happens when you have an error and compile your javascript code. Later, when you fix it, it will remain in cache and happens. Please try to compile your script again and login to see.

这个解决方案也在发挥作用.

I run npm update and npm run dev, it is working fine.

Laravel相关问答推荐

Laravel将变量从模板到已发布的供应商模板

提交表格后如何在Livewire 3中调度模式窗口?

Laravel-如何按第三表关系对数据进行分类

密码确认在Livewire中不匹配

在 Laravel 中排序的集合在 Vue 中突然不再排序

按回车键时如何防止此功能运行?

Laravel - 如果值包含某个字符串(取自搜索输入),则查询模型

为什么 laravel 模型会重复一组数据以及如何(如果可能)只有一组数据?

路由中间的可选参数

如何更改 Laravel5 中的视图文件夹?

Laravel 5.3 - 将多个文件附加到 Mailables

未找到 PHP 5.4 和 Laravel 类Memcached

Laravel 将参数从路由传递到过滤器

laravel Blade中多选选项中的旧值

数组的旧输入?

如何在 php Laravel 中对关联数组进行排序

Laravel 字符串验证以允许空字符串

如何以 JSON 格式发送 Laravel 错误响应

Laravel binding绑定的用途和目的是什么?

函数参数前的三个点代表什么?