TAY
笔记 · · 阅读 125
更新于

宝塔 laravel vue npm run dev 运行

vite.config.js

import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';

export default defineConfig({
    server: { 
        https: false,
        host: true,
        port: 1046,
        hmr: {host: '192.168.45.131', protocol: 'ws'},
    },
    plugins: [
        laravel({
            input: 'resources/js/app.js',
            refresh: true,
        }),
        vue({
            template: {
                transformAssetUrls: {
                    base: null,
                    includeAbsolute: false,
                },
            },
        }),
    ],
});
15:35:23 [vite] server restarted.

  ➜  Local:   http://localhost:1047/
  ➜  Network: http://192.168.45.131:1047/

  LARAVEL v11.0.3  plugin v1.0.2

  ➜  APP_URL: http://192.168.45.131:1046

宝塔 安全 系统防火墙 放行 1047 端口

目录