How to put JavaScript in your assets and NOT have it compiled?

It use to be you could put .js files in Assets/WebPlayerTemplates and Unity would not try to compile them as they were meant for the browser, not for unity.

As of 2018.2.7F1 that no longer seems to work. Unity is trying to compile those JS files even though they are meant for the browser (I get the WebPlayer is no longer supported but I’m not using them for the webplayer)

Supposedly I can make WebGL templates in Assets/WebGLTemplates and putting an .HTML file there works but putting a .JS file there Unity tries to compile them.

Is there a way to get unity to NOT compile .js files? Put them in some special named folder? At some meta file? What?

I took a look and the as a workaround you can just reopen your project and the compile errors should go away. If they don’t please open a bug report as described under Unity QA - Bug Reporting - Unity

Well, my solution back then was just to rename all the files to some other extension like “blablabla.my-js”. It sucks because I can’t just leave the files as “.js” and any browser libraries I add have to have all there references renamed but at least Unity didn’t try to compile them