Production build url is linking to dev server http://[::1]:5173/

When I run

npm run build

the production build urls are linked to the dev server

http://[::1]:5173/

Here is my vite config file

import { defineConfig } from 'vite'
import tailwindcss from '@tailwindcss/vite';
import laravel from 'laravel-vite-plugin'
import inject from "@rollup/plugin-inject";
import { wordpressPlugin, wordpressThemeJson } from '@roots/vite-plugin';

export default defineConfig({
  optimizeDeps: {
    exclude: ['slick-carousel'],
  },
  base: '/wp-content/themes/{ MY_THEME }/public/build/',
  plugins: [
    inject({
      $: 'jquery',
      jQuery: 'jquery',
    }),
    tailwindcss(),
    laravel({
      input: [
        'resources/css/app.css',
        'resources/js/app.js',
        'resources/css/editor.css',
        'resources/js/editor.js',
      ],
      refresh: true,
    }),

    wordpressPlugin(),

    // Generate the theme.json file in the public/build/assets directory
    // based on the Tailwind config and the theme.json file from base theme folder
    wordpressThemeJson({
      disableTailwindColors: false,
      disableTailwindFonts: false,
      disableTailwindFontSizes: false,
    }),
  ],
  resolve: {
    alias: {
      '@scripts': '/resources/js',
      '@styles': '/resources/css',
      '@fonts': '/resources/fonts',
      '@images': '/resources/images',
    },
  },
})

Looks like you’ve got a npm run dev process running somewhere and you uploaded the public/hot file

Related: Deploying while Vite dev server is active causes broken URLs due to public/hot file existing

Thank you Ben.

I also found a solution here in the Laracasts forum

https://laracasts.com/discuss/channels/vite/vite-appcss-showing-15173-url-in-production-page-has-no-styling-at-all