Search code examples
jsonangularionic-frameworkconfigcapacitor

Ionic and Capacitor: How can i change the capacitor.config.ts file to a capacitor.config.json file?


I created an Angular/Ionic project with capacitor. Now I wanted to make changes in my capacitor.config.json but this file is missing? Instead there is the capacitor.config.ts?!

I need the JSON File because otherwise a specific plugin doesnt work!

Here are pictures of my directory and my package.json: Directory and Files

package.json file


Solution

  • Capacitor 3 allows to have .json, .js or .ts config file.

    npx cap init command will create a .ts file if typescript is installed If you don’t want a .ts file you can just remove it and create a .json file, but everything should still work no matter what the config file extension is.