FluentMaterial fails to compile via vite

Repo:

Seems like somehow index.html content appears in shader code and breaks it down

I created issue in the vite repo: FluentMaterial fails to compile via vite · Issue #17542 · vitejs/vite · GitHub

Hello and welcome!

The issue is not related to Vite.
You mix different Babylon import types, with @ and without @.

Change your package json relevant lines to:

  "dependencies": {
    "@babylonjs/gui": "^7.12.0",
    "@babylonjs/core": "^7.12.0"
  }

Also change import in main.ts

import {
  ArcRotateCamera,
  Engine,
  Scene,
  TransformNode,
  Vector3,
} from "@babylonjs/core";
import { GUI3DManager, HolographicButton, SpherePanel } from "@babylonjs/gui/";

Then delete node_modules folder completely and perform npm i again.
It should work :slight_smile:

Thank you for quick answer and solution!

1 Like