I am experiencing the following error after adding Tailwind to my project and I’m not sure how to solve it? Can anyone help me? Thanks
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “video/mp2t”. Strict MIME type checking is enforced for module scripts per HTML spec.
try vite for installing “react” with "type script with this npm create vite@latest and then simply add tailwind to that mix, read tailwind docs for installation with “vite”
Thank you but I am not using React in my project. I created a a project using Vite and I chose Vanilla JS and Typescript as the options. I have also already installed tailwind. I have the error in the console and I can see that my styling is viewable but I get the error in the console.
I was able to solve my issue. I did everything that @lasjorg recommended but also changed my script tag in my HTML to /dist/assets/whatever.js instead of /src/main.ts.
Thanks everyone!
UPDATE
The above didn’t actually work. I am still getting the same error in the console.
UPDATE 2
I solved my issue and it was me being dumb
I was using Live Server instead of using the url that was given to me after running npm run dev to view my project…Live Server is unable to read .ts files and Live Server needs those to be converted to .js…the post underneath helped me realize what I was doing wrong