Skip to content
Discussion options

You must be logged in to vote

Capacitor doesn't require typescript (nor angular), the code in the docs can be used in javascript or typescript files without problems, but you need to use a bundler (like webpack). I can't really help you with that because I always use frameworks that have everything configured out of the box so I don't need to worry about that.

If you don't want to use a bundler/framework, you can set "bundledWebRuntime": true in capacitor.config.json. That generates a capacitor.js file you can link in your app.
That way you can use Capacitor object directly, which includes a Plugins object that contains all plugins.
So you can use the plugins like Capacitor.Plugins.Device.getInfo();.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@AsaoluElijah
Comment options

Answer selected by AsaoluElijah
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants