Comments (6)
@umidullo Thank you for reporting issue!
Please update to @2.0.1 version, I fixed error in package.json with export types
https://github.com/vkruglikov/react-telegram-web-app/releases/tag/v2.0.1
from react-telegram-web-app.
@umidullo Can you share the vite + Typescript configuration you are using? I tried to do the same and it gives the following error
Yes, sure. But I didn’t do anything specific. I just initialized the project on vite and that’s it
tsconfig.json
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["src"],
"references": [{ "path": "./tsconfig.node.json" }]
}
vite.config.ts
import svg from '@neodx/svg/vite';
import react from '@vitejs/plugin-react';
import * as path from 'path';
import { defineConfig } from 'vite';
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: [{ find: '@', replacement: path.resolve(__dirname, 'src') }],
},
plugins: [
react(),
svg({
root: 'assets', // Root folder for SVG files, all source paths will be relative to this folder
group: false, // Group SVG files by folder
output: 'public', // Output folder for generated files
definitions: 'src/components/ui/icon/sprite.gen.ts', // Output file for generated TypeScript definitions
optimize: true,
resetColors: {
replace: ['#000', 'black', '#000000'], // Resets all known colors to `currentColor`
replaceUnknown: 'var(--icon-color)',
},
}),
],
});
from react-telegram-web-app.
@umidullo Hi! What version of the package?
2.0.0 or less ?
from react-telegram-web-app.
2.0.0
from react-telegram-web-app.
Thanks for the quick response
from react-telegram-web-app.
@umidullo Can you share the vite + Typescript configuration you are using? I tried to do the same and it gives the following error
from react-telegram-web-app.
Related Issues (11)
- Add expand() HOT 6
- suggestion HOT 4
- disabled MainButton still has normal appearance HOT 3
- Mainbutton and Backbutton not show in next.js HOT 9
- useInitData doesn't work with nextjs HOT 2
- WebAppUser.photo_url has type "true", instead of "string" HOT 2
- How to add a share button in the miniapp?
- React Hook cannot be called in a class component HOT 3
- Access window.navigator in twa? HOT 1
- Request SettingsButton HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-telegram-web-app.