When using the non-beta version of Vite v8 with the example repo https://github.com/geoman-io/maplibre-geoman-examples/tree/master/maplibre-geoman-react, production builds now have a runtime error. This error is not present in vite dev server builds.
Attached screenshot is a prod build with sourcemap enabled for a better trace.

My investigation into why this now occurs with the non-beta version of vite v8 is due to its use of oxc for the Javascript/Typescript transformation/minification as mentioned here: https://vite.dev/guide/migration#javascript-transforms-by-oxc
Altering the vite config with the following resulted in example repo working as expected again. (Note you do need to add esbuild as a dependency now with vite v8 for this to work)
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
optimizeDeps: {
exclude: ["@geoman-io/maplibre-geoman-free"],
},
build: { minify: "esbuild" },
});
When using the non-beta version of Vite v8 with the example repo https://github.com/geoman-io/maplibre-geoman-examples/tree/master/maplibre-geoman-react, production builds now have a runtime error. This error is not present in vite dev server builds.
Attached screenshot is a prod build with sourcemap enabled for a better trace.

My investigation into why this now occurs with the non-beta version of vite v8 is due to its use of oxc for the Javascript/Typescript transformation/minification as mentioned here: https://vite.dev/guide/migration#javascript-transforms-by-oxc
Altering the vite config with the following resulted in example repo working as expected again. (Note you do need to add esbuild as a dependency now with vite v8 for this to work)