So Laravel decided to innovate once again and fix what was not broken, so Mix is gone and now default asset bundling goes with Vite.
I'm following the absolute default in their documentation to a bunch of front-end bugs and finally only several remained:
I use Laragon with SSL.
I haven't configured anything additional and my vite.config.js looks like this:
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
export default defineConfig({
plugins: [ …Run Code Online (Sandbox Code Playgroud) 我有一个来自 的财产axios.get。
它在我的dataas null(or ''or [])中定义
呼叫axios处于created挂断状态。
当应用程序首次加载时,控制台会填充
Error in render: "TypeError: Cannot read property 'service' of null"
Run Code Online (Sandbox Code Playgroud)
当然,它实际上在网页上正确显示了信息,因为serviceis not null,但这个错误显然是在 axios 获取数据之前抛出的。
这里最好的方法是什么?