Create new .jsx file

I'm using IntelliJ IDEA Ultimate 2017.1 to develop a meteor app with React. I'd like to create a new .jsx file, but when I right-click on a folder and choose "New", I have an option to create a JavaScript file but not a .jsx file. Is there any way I can get IntelliJ to allow me to create JSX files?

5 comments
Comment actions Permalink

Choose New - File and enter a name with extension (for example, test.jsx).

0
Comment actions Permalink

Same question for tsx. It's a bit annoying to input extension all the time, can you guys guess the file types that project is using and suggest those instead of the default list


Funny, but I'm not creating any of these files in my project. Why would anyone want to create a `package.json` file?
I think this functionality needs to be reconsidered. 

0
Comment actions Permalink

In about 60-70% of modern web application package.json is required, as needed dependencies are installed through npm/yarn. Same is true for all file types you can see in menu.

If you need adding tsx to this list, create a new file template for .tsx in Settings | Editor | File and Code Templates - you may leave it empty or specify some code to be generated on file creating. See https://www.jetbrains.com/help/webstorm/2017.3/file-and-code-templates.html and linked Help sections

 

0
Comment actions Permalink

Elena Pogorelova, I'm using my copy of IntelliJ in different locations, on different PC's, and it is ok to setup it once, like you said, but now, after update, those settings are lost and I'm supposed to repeat it again.

So, like Dziamid Zayankouski is said, it's a bit annoying to input extension all the time. Especially such common extensions, like JSX. Can't you, guys, really add it to the list?

0
Comment actions Permalink

You can share your settings using GitHub repository ( settings repository plugin) or JetBrains server ( IDE Settings Sync plugin) - see https://www.jetbrains.com/help/webstorm/2018.2/sharing-your-ide-settings.html - to be able to sync them between different locations/versions.

Also, you can import your preferences from previous version - when opening it for the first time, the IDE normally prompts you to import them

0

Please sign in to leave a comment.