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

2
  • I have the same problem with a .php extension Commented Jan 3, 2017 at 8: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 Commented Jan 3, 2017 at 9:46

1 Answer 1

0

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

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for the answer but I don't have the option "Mark as JavaScript" in the rolldown menu.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.