youtube-dl downloader plugin for webpack
A webpack plugin that downloads youtube-dl
Why
- Auto install the latest or specific
youtube-dl
version available as webpack plugin.
Installation
npm install --save-dev youtube-dl-downloader-webpack-plugin
Usage
const { YoutudeDlDownloaderWebpackPlugin } = require("youtube-dl-downloader-webpack-plugin");
const webpackConfig = {
plugins: [
new YoutudeDlDownloaderWebpackPlugin({
from: 'website',
to: 'lib'
})
],
};
module.exports = webpackConfig;
Options and Defaults (Optional)
new YoutudeDlDownloaderWebpackPlugin({
/**
* A platform of youtube-dl ('win32', 'auto' or 'not')
*
* default: ['win32', 'unix']
*/
platform?: string[] | string;
/**
* 'github' or 'website'; server where would like to download
*
* default: 'website'
*/
from?: DownloadFrom;
/**
* When {from: 'github'}, a version to download youtube-dl from github releases
*
* default: [lastest version]
*/
version?: string;
/**
* A version to download youtube-dl
*/
to: string;
/**
* use EnableDefine
*
* default: false
*/
enableDefine?: boolean;
});