Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/*
* https://github.com/rochars/wavefile
* Copyright (c) 2017-2018 Rafael da Silva Rocha.
*/
/**
* @fileoverview webpack configuration file.
* Three dist files are created:
* - wavefile.cjs.js, CommonJS dist for Node. No dependencies included.
* - wavefile.umd.js, UMD with dependencies included.
* - wavefile.min.js, Compiled for browsers. All dependencies included.
*/
const ClosureCompiler = require('google-closure-compiler-js').webpack;
module.exports = [
// CommonJS dist, no dependencies in the bundle.
// Will be the one in the "main" field of package.json.
{
target: 'node',
entry: './index.js',
output: {
filename: './dist/wavefile.cjs.js',
libraryTarget: "commonjs"
},
externals: {
'byte-data': 'byte-data',
"alawmulaw": "alawmulaw",
"base64-arraybuffer": "base64-arraybuffer",
"bitdepth": "bitdepth",