From 8753c8deb136e8451af100eb76acf3b9c97c86a7 Mon Sep 17 00:00:00 2001 From: Alex Jarvis Date: Fri, 26 Aug 2022 08:13:00 -0400 Subject: [PATCH] 1.6.5 - fix node targets (#245) * No need for node next, best of both worlds * use condensed rollup * 1.6.5 --- package.json | 2 +- rollup.config.js | 60 ++++++++++++++++++------------------------------ tsconfig.json | 4 ++-- 3 files changed, 25 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index 902b26b0..5b68c0a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "randsum", - "version": "1.6.4", + "version": "1.6.5", "private": false, "author": "Alex Jarvis", "description": "rand for the rest of us", diff --git a/rollup.config.js b/rollup.config.js index 9a601747..a850a04c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -17,6 +17,23 @@ const banner = ` * Released under the ${pkg.license} license. */ ` +const plugins = [ + pluginTypescript({ + tsconfig: './tsconfig.build.json' + }), + pluginCommonjs({ + extensions: ['.js', '.ts'] + }), + babel({ + babelHelpers: 'bundled', + configFile: path.resolve(__dirname, '.babelrc.js') + }) +] + +const external = [ + ...Object.keys(pkg.dependencies || {}), + ...Object.keys(pkg.devDependencies || {}) +] export default [ { @@ -39,16 +56,7 @@ export default [ } ], plugins: [ - pluginTypescript({ - tsconfig: './tsconfig.build.json' - }), - pluginCommonjs({ - extensions: ['.js', '.ts'] - }), - babel({ - babelHelpers: 'bundled', - configFile: path.resolve(__dirname, '.babelrc.js') - }), + ...plugins, pluginNodeResolve({ browser: true }) @@ -67,21 +75,9 @@ export default [ exports: 'named' } ], - external: [ - ...Object.keys(pkg.dependencies || {}), - ...Object.keys(pkg.devDependencies || {}) - ], + external, plugins: [ - pluginTypescript({ - tsconfig: './tsconfig.build.json' - }), - pluginCommonjs({ - extensions: ['.js', '.ts'] - }), - babel({ - babelHelpers: 'bundled', - configFile: path.resolve(__dirname, '.babelrc.js') - }), + ...plugins, pluginNodeResolve({ browser: false }) @@ -100,21 +96,9 @@ export default [ exports: 'default' } ], - external: [ - ...Object.keys(pkg.dependencies || {}), - ...Object.keys(pkg.devDependencies || {}) - ], + external, plugins: [ - pluginTypescript({ - tsconfig: './tsconfig.build.json' - }), - pluginCommonjs({ - extensions: ['.js', '.ts'] - }), - babel({ - babelHelpers: 'bundled', - configFile: path.resolve(__dirname, '.babelrc.js') - }), + ...plugins, pluginNodeResolve({ browser: false }) diff --git a/tsconfig.json b/tsconfig.json index 164a37f4..6ba19f67 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { - "target": "es5", - "module": "es6", + "target": "es2018", + "module": "esnext", "moduleResolution": "node", "sourceMap": true, "declaration": true,