Skip to content

Miscellaneous

Neodymium edited this page Dec 10, 2024 · 4 revisions

BundleBD also includes all of the following miscellaneous features and utilities.

styles

The styles module exports a function that allows you to access all of the imported styles from every file in your plugin.

import styles from "styles";

console.log(styles()); // Logs the processed contents of every stylesheet imported throughout all of your plugin's files.

It also contains some shortcut functions to easily inject and remove basic styles.

import { addStyles, removeStyles } from "styles";

addStyles(); // Equivalent to DOM.addStyle(styles())

removeStyles(); // Equivalent to DOM.removeStyle()