Giter Site home page Giter Site logo

Comments (1)

fivepixels avatar fivepixels commented on June 14, 2024 2

I guess this problem has already been resolved, but just for you,

  1. This is not a problem with this plugin.

This plugin is just for people who want to use the features from dts bundle generator but in Bun. This project just kind of imports all features that we can normally use with that dts bundle generator and imports it as a Bun plugin. That is also the reason why the options in this project look pretty similar to the options in the dts bundle generator, except that we have to put the dts() call stuff inside of the plugins. If you still think there is a problem with this after reading the next thing, then you will have to make an issue on the official repository that this project uses.

  1. You have to write all codes manually again.

If you look at Next.js or any other famous TypeScript frameworks, you will be able to see their tremendous works of just importing all types that the developers might have to use and exporting all imported types again from one file, like this, or this. Also, they never import any files with JPG, PNG or any other images/videos/or assets types because it is impossible to make TypeScript types for them. So, what you probably have to do is to reimport all types, reexport them in a single file without files with those extensions, set that file as the entry point, and run the script for Bun. And do not forget to add this path ./dist/index.d.ts or whatever you set it as to the "types" field in your package.json so that the final file can also be exported out of the node_modules folder.

If you have any questions or something, please comment below.

from bun-plugin-dts.

Related Issues (4)

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.