From bb5ec8fc12c2bd3d2335db5b4403a6c39b4ccc5e Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Wed, 15 Apr 2020 17:35:00 +0800 Subject: [PATCH] - Remove file relying on transpiling source (will give wrong `import.meta.url` until having Node 13 as a minimum and refactoring to avoid transpilation as `rollup.config.mjs`); the other, now only config, instead points to the bundled `dist` filesize for now. --- rollup.config-not-working-with-import-meta.js | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 rollup.config-not-working-with-import-meta.js diff --git a/rollup.config-not-working-with-import-meta.js b/rollup.config-not-working-with-import-meta.js deleted file mode 100644 index e7fb6e5..0000000 --- a/rollup.config-not-working-with-import-meta.js +++ /dev/null @@ -1,43 +0,0 @@ -import babel from "rollup-plugin-babel"; -import filesize from "./src/index.js"; -import pkg from "./package.json"; - -const reporters = ["boxen"]; - -export default [ - { - external: ["path", "fs", "util", ...Object.keys(pkg.dependencies)], - plugins: [ - babel({ - babelrc: false, - plugins: ["@babel/plugin-syntax-import-meta"], - presets: [["@babel/preset-env", { targets: { node: 8 } }]], - }), - filesize(), - ], - input: "src/index.js", - output: { - sourcemap: true, - file: `dist/index.js`, - format: "cjs", - }, - }, - ...reporters.map((reporter) => { - return { - plugins: [ - babel({ - babelrc: false, - presets: [["@babel/preset-env", { targets: { node: 8 } }]], - }), - filesize(), - ], - input: `src/reporters/${reporter}`, - output: { - exports: "named", - sourcemap: true, - file: `dist/reporters/${reporter}.js`, - format: "cjs", - }, - }; - }), -];