chore: subpath exports

This commit is contained in:
DevAndromeda 2022-01-26 01:14:20 +05:45
parent 5e068e573f
commit 6f24b458bb
2 changed files with 19 additions and 2 deletions

View file

@ -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

View file

@ -9,8 +9,11 @@
], ],
"module": "dist/index.mjs", "module": "dist/index.mjs",
"exports": { "exports": {
"require": "./dist/index.js", ".": {
"import": "./dist/index.mjs" "require": "./dist/index.js",
"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",