diff --git a/.babelrc b/.babelrc new file mode 100644 index 0000000..95f66ec --- /dev/null +++ b/.babelrc @@ -0,0 +1,5 @@ +{ + "presets": [ + "@babel/env" + ] +} \ No newline at end of file diff --git a/package.json b/package.json index 12f62b3..5f65304 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,9 @@ "query" ], "devDependencies": { + "@babel/core": "^7.9.0", + "@babel/preset-env": "7.8.7", + "rollup-plugin-babel": "^4.4.0", "@rollup/plugin-commonjs": "^11.0.2", "@rollup/plugin-json": "^4.0.2", "@rollup/plugin-node-resolve": "^7.1.1", @@ -65,9 +68,6 @@ "rollup-plugin-terser": "^5.2.0" }, "license": "BSD-3-Clause", - "engines": { - "node": ">=8.0" - }, "dependencies": { "estraverse": "^5.0.0" } diff --git a/rollup.config.js b/rollup.config.js index dedfb2d..44fdc25 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -3,6 +3,7 @@ import { terser } from 'rollup-plugin-terser'; import nodeResolve from '@rollup/plugin-node-resolve'; import commonjs from '@rollup/plugin-commonjs'; import json from '@rollup/plugin-json'; +import babel from 'rollup-plugin-babel'; /** * @external RollupConfig @@ -30,7 +31,8 @@ function getRollupObject ({ minifying, format = 'umd' } = {}) { plugins: [ json(), nodeResolve(), - commonjs() + commonjs(), + babel({ exclude: 'node_modules/**' }) ] }; if (minifying) {