gramjs
gramjs copied to clipboard
How to run on angular browser
How to run on angular browser
you can use webpack to create a dist file (clone this repo and just run webpack) and then you import it like any other file.
@painor But how to get types for bundle ? defines.d.ts has relative path inside ...
@redradist you cannot get types for the bundle right now.
But if your project which uses GramJS uses Webpack itself, you can just install it with npm i telegram
and develop easily with types. After building your project, GramJS gets bundle with it.
Hi @roj1512,
Sorry for the possibly dumb question for you.
I'm also interested in using gramjs
with Angular in the browser. But I don’t understand how exactly I should proceed in order to use types and have the project build without errors.
I have already built a separate telegram.js
file from the gramjs
project using the webpack
command.
Linking this file to the project seems to prevent the types from being used.
And if I execute the command npm i telegram
, the project will not build.
Could you describe step by step, please, what to do in this situation?