Skip to content
Neodymium edited this page Apr 29, 2023 · 6 revisions

1. What?! Another Discord plugin bundler/builder/transpiler? Aren't there a few of those already?

Well, there's a few reasons I decided to make a new one...

First, none of the others really worked perfectly and exactly the way I wanted them to, and most were lacking guides or documentation. This is definitely something I could deal with though, which leads me to my second, and main reason for making this bundler.

I was just kind of bored and wanted something useful to make ¯\_(ツ)_/¯. I was working on some kind of Webpack configuration for my own plugin development, so I decided to put the work into making it a hopefully easy to use public package. Even if BundleBD isn't the most feature-rich or well optimized Discord plugin bundler on the market, the experience from making a real package (for the first time for me) and utilizing some of the skills I've learned in the past was definitely worth all the effort. And maybe over time it will be able to grow into something better.

2. Why are typings/autocomplete not working?

Due to how VS Code and Typescript look for type declarations by default, BundleBD's types may not be automatically detected and used for autocomplete. There are a few solutions to this though.

Solution 1: Including a reference directive

This one is pretty self explanatory. Adding a reference directive to the top of your file will allow Typescript to detect the bundler's types, like so:

/// <reference types="bundlebd" />

export default class Plugin {
	start() {
		console.log("No more type issues!");
	}

	stop() {}
}

Solution 2: TSConfig

Using a TSConfig file requires a little extra work, but should automatically detect the bundler's types in every file. Simply make a tsconfig.json file in your root folder with the following contents:

// tsconfig.json

{
	"compilerOptions": {
		"types": ["node", "bundlebd"]
	}
}

Or, if you're already using a TSConfig file, you can add the types property to it.

For more information on recommended Typescript configuration, see here.

Solution 3: Global Type Declaration File (Recommended)

To also detect types in every file, you can create a type declaration file in your project's root with a reference to BundleBD's types. For example:

// global.d.ts

/// <reference types="bundlebd" />

3. I have a feature/change suggestion or bug to report, what should I do?

Just make an issue on Github, and I'll be sure to take a look at it and be happy to solve any problems or consider any requests. Make sure your issue thoroughly and clearly describes the bug or feature, and include any other info like examples, images, etc. that might be helpful.