Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
compiler.run((err, stats) => {
if (stats.hasErrors() || stats.hasWarnings()) {
reject(new Error(stats.toString({ errorDetails: true, warnings: true })));
} else {
const transpiledWorkerString = fs
.readFileSync('/worker.js', 'utf-8')
.replace(/\\/g, '\\\\')
.replace(/\${/g, '\\${');
resolve({
input: 'build/es2018/module.js',
output: {
file: 'build/es5/bundle.js',
format: 'umd',
name: 'webAudioBeatDetector'
},
plugins: [
replace({
delimiters: [ '`', '`' ],
include: 'build/es2018/worker/worker.js',
values: {
fs.readJsonSync = filePath => JSON.parse(fs.readFileSync(filePath, 'utf8'));
compiler.run((err, stats) => {
if (stats.hasErrors() || stats.hasWarnings()) {
reject(new Error(stats.toString({ errorDetails: true, warnings: true })));
} else {
const transpiledWorkerString = fs
.readFileSync('/worker.js', 'utf-8')
.replace(/\\/g, '\\\\')
.replace(/\${/g, '\\${');
resolve({
input: 'build/es2018/module.js',
output: {
file: 'build/es5/bundle.js',
format: 'umd',
name: 'workerTimers'
},
plugins: [
replace({
delimiters: [ '`', '`' ],
include: 'build/es2018/worker/worker.js',
values: {
compiler.run((err, stats) => {
if (stats.hasErrors() || stats.hasWarnings()) {
reject(new Error(stats.toString({ errorDetails: true, warnings: true })));
} else {
const transpiledWorkerString = fs
.readFileSync('/worker.js', 'utf-8')
.replace(/\\/g, '\\\\')
.replace(/\${/g, '\\${');
resolve({
input: 'build/es2018/module.js',
output: {
file: 'build/es5/bundle.js',
format: 'umd',
name: 'midiJsonParser'
},
plugins: [
replace({
delimiters: [ '`', '`' ],
include: 'build/es2018/worker/worker.js',
values: {