UNPKG

node-taglib-sharp-extend

Version:

read and write audio file metadata in nodejs / browser(memory)

40 lines (37 loc) 1.06 kB
import { Plugin } from 'vite'; import { PolyfillOptions } from 'vite-plugin-node-polyfills'; /** * please make sure you have installed `vite-plugin-node-polyfills` * * when dev, * default includes: `['buffer', 'string_decoder', 'stream', 'crypto', 'fs', 'path', 'util']` * * when build, * default includes: `['buffer', 'string_decoder']`, * other modules are manually transformed by the plugin * * default global: `{ Buffer: true }` * @example * import { defineConfig } from 'vite' * import { polyfillTaglib } from 'node-taglib-sharp-extend/vite' * * export default defineConfig(({ command }) => ({ * plugins: [ * polyfillTaglib({ * isBuild: command === 'build', * // extra options * }), * ], * })) */ declare function polyfillTaglib(extraOptions?: PolyfillOptions & { isBuild?: boolean; }): Plugin[]; /** * Config for `build.rollupOptions.output.manualChunks` */ declare const taglibManualChunksConfig: { iconv: string[]; taglib: string[]; }; export { polyfillTaglib, taglibManualChunksConfig };