1

Hello and happy new year;

I have a weird issue related to a JS file that I created in my project.

I am working with PhpStorm and Symfony. When I create a JS file into the js folder, no matter what, if I name it "main.js" it will undoubtedly turn this file into a text file. Even though I choose to create a JavaScript file.

If I put any other name it will work fine. To correct the problem I could easily change the name and that is it but this is a joint project and I cannot change it.

I was looking in PhpStorm settings but couldn't find any solution to it. Maybe I thought that here people would have encountered that kind of problem.

Here is the crime scene:

Here is the crime scene

chicken burger
  • 774
  • 2
  • 12
  • 32
  • I have the same problem with a `.php` extension – goto Jan 03 '17 at 08:58
  • check this Link goto, it helped me :) I didn't see it while searching on stack, my research was not well targeted [the link](http://stackoverflow.com/questions/15591003/how-can-i-change-the-file-type-association-of-an-existing-file-in-webstorm) – chicken burger Jan 03 '17 at 09:46

1 Answers1

0

Try right-click on it file and select Mark as JavaScript

enter image description here

Justinas
  • 41,402
  • 5
  • 66
  • 96