-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unable to import glsl file properly #37
Comments
Happy to report that I just got rid of this error by: Deleting the node_modules folder and package_lock.json and running npm install again. |
@sophyem Cool! Also, please note that with |
Thank you for catching that! I changed it |
Hi there, Bad news... the error reappeared. Reinstalling didn't actually solve it. Please help! |
Hi @sophyem! Sure. This error:
which should be:
If changing that still won't work, please try to remove |
Hi, I am working on a simple three.js project. I am trying to build and import a custom shader into my js code. However, after I installed the vite-plugin-vlsl following every step in the README.md file, I still could not get my js to read the glsl file properly and got the error as following:
Uncaught SyntaxError: Unexpected token '{' (at vertex.glsl?t=1679695882090&import:1:13)
I have restarted the server many times and also tried to tweak the code in the package.json file and vite.config.js file following the discussion in #1
Because the error I keep getting is the same error you would get when you don't have the plugin installed, I checked many times to make sure the setup is correct in every file, but I am still lost at what I am missing here. Thank you for your help in advance!
My package.json file:
vite.config.js file
my vertex.glsl file
my main.js file
The text was updated successfully, but these errors were encountered: