所以我最近才开始在控制台中收到以下警告:
“源映射错误:请求失败,状态为404” 资源网址:http://127.0.0.1:8000/js/app.js 地图资源网址:shvl.es.js.map“
有人曾经经历过吗?我不知道这可能是什么?
我的webpack文件:
let mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
答案 0 :(得分:0)
启用/禁用源映射可以通过提供配置mix.sourceMaps(!mix.inProduction())
来处理。
确保启用了开发模式。
更新的混合配置文件
let mix = require('laravel-mix');
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.sourceMaps(!mix.inProduction())