diff --git a/rollup.config.js b/rollup.config.js index 9b16852..df9b86a 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,6 +1,3 @@ -import resolve from '@rollup/plugin-node-resolve'; -import commonjs from "@rollup/plugin-commonjs"; - export default [ { input: "./src/index.js", @@ -9,9 +6,5 @@ export default [ { file: "dist/index.esm.mjs", format: "es" }, { file: "dist/index.umd.js", format: "umd", name: "unitFlip" }, ], - plugins:[ - resolve(), - commonjs(), - ] }, ]; diff --git a/src/index.js b/src/index.js index 6cfc540..aed3e0e 100644 --- a/src/index.js +++ b/src/index.js @@ -407,7 +407,7 @@ const conversion = { * @throws {Error} If the target or source unit does not exist in the conversion unit. */ -module.exports = ( +const unitFlip = ( value, sourceUnit, targetUnit, @@ -450,3 +450,5 @@ module.exports = ( return converted; }; + +export default unitFlip;