Code Monkey home page Code Monkey logo

Comments (6)

vkruglikov avatar vkruglikov commented on August 15, 2024 1

@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 avatar umidullo commented on August 15, 2024 1

@umidullo Can you share the vite + Typescript configuration you are using? I tried to do the same and it gives the following error

image

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.

vkruglikov avatar vkruglikov commented on August 15, 2024

@umidullo Hi! What version of the package?

2.0.0 or less ?

from react-telegram-web-app.

umidullo avatar umidullo commented on August 15, 2024

2.0.0

from react-telegram-web-app.

umidullo avatar umidullo commented on August 15, 2024

Thanks for the quick response

from react-telegram-web-app.

vlont avatar vlont commented on August 15, 2024

@umidullo Can you share the vite + Typescript configuration you are using? I tried to do the same and it gives the following error

image

from react-telegram-web-app.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.