diff --git a/package.json b/package.json index c757943..2626502 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ }, "dependencies": { "replace-requires": "^1.1.0", - "through2": "^4.0.1", "transformify": "^0.1.2" }, "standard": { diff --git a/transform.js b/transform.js index 81f2069..9f0d960 100644 --- a/transform.js +++ b/transform.js @@ -1,11 +1,11 @@ 'use strict' -const through = require('through2') +const { PassThrough } = require('stream') const transformify = require('transformify') const replaceRequires = require('replace-requires') module.exports = function (file, options) { - if (/\.json$/.test(file)) return through() + if (/\.json$/.test(file)) return new PassThrough() return transformify(replaceProxyquire)() }