chore: subpath exports
This commit is contained in:
parent
5e068e573f
commit
6f24b458bb
2 changed files with 19 additions and 2 deletions
14
README.md
14
README.md
|
@ -166,6 +166,20 @@ These bots are made by the community, they can help you build your own!
|
||||||
|
|
||||||
## Advanced
|
## Advanced
|
||||||
|
|
||||||
|
### Smooth Volume
|
||||||
|
|
||||||
|
Discord Player will make volume transition smooth. To enable this, you need to add this line at the top of your main file:
|
||||||
|
|
||||||
|
```js
|
||||||
|
// CJS
|
||||||
|
require("discord-player/smoothVolume");
|
||||||
|
|
||||||
|
// ESM
|
||||||
|
import "discord-player/smoothVolume"
|
||||||
|
```
|
||||||
|
|
||||||
|
> ⚠️ Make sure that line is situated at the **TOP** of your **main** file.
|
||||||
|
|
||||||
### Use cookies
|
### Use cookies
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
|
@ -9,9 +9,12 @@
|
||||||
],
|
],
|
||||||
"module": "dist/index.mjs",
|
"module": "dist/index.mjs",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
".": {
|
||||||
"require": "./dist/index.js",
|
"require": "./dist/index.js",
|
||||||
"import": "./dist/index.mjs"
|
"import": "./dist/index.mjs"
|
||||||
},
|
},
|
||||||
|
"./smoothVolume": "./dist/smoothVolume.js"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cd example/test && ts-node index.ts",
|
"dev": "cd example/test && ts-node index.ts",
|
||||||
"build": "rimraf dist && tsc && npm run build:esm",
|
"build": "rimraf dist && tsc && npm run build:esm",
|
||||||
|
|
Loading…
Reference in a new issue