小编Our*_*rBG的帖子

Default Laravel + Vite configuration throws WebSocket connection to failed:

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)

laravel vite laravel-9 laravel-vite

5
推荐指数
3
解决办法
7963
查看次数

Vue.js 在赋值之前无法读取 null/undefined 的属性

我有一个来自 的财产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 获取数据之前抛出的。

这里最好的方法是什么?

vuejs2

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

laravel ×1

laravel-9 ×1

laravel-vite ×1

vite ×1

vuejs2 ×1