diff --git a/src/index.js b/src/index.js index a8dfbbb..07139bf 100644 --- a/src/index.js +++ b/src/index.js @@ -1,8 +1,6 @@ const path = require('path'); -const fs = require('fs'); const { CWebp, DWebp } = require('./webp'); -const pkg = path.resolve(__dirname, '../package.json'); -const { version } = JSON.parse(fs.readFileSync(pkg, 'utf8')); +const { version } = require('../package.json'); module.exports = Object.assign(CWebp, { CWebp, DWebp, version });