From 98279eec40c9adba827405b6a3b2b4d85bd0d1fe Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Tue, 18 Oct 2022 06:34:09 +0200 Subject: [PATCH] fix rollup-error and use commonjs for the rollup-config --- public/package.json | 2 +- public/{js => }/rollup.config.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) rename public/{js => }/rollup.config.js (52%) diff --git a/public/package.json b/public/package.json index a40f1c8..356f412 100644 --- a/public/package.json +++ b/public/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "jshint": "cd js && jshint .", - "bundle": "cd js && rollup -c rollup.config.js" + "bundle": "rollup -c rollup.config.js" }, "author": "", "license": "ISC", diff --git a/public/js/rollup.config.js b/public/rollup.config.js similarity index 52% rename from public/js/rollup.config.js rename to public/rollup.config.js index d1a98d1..518671e 100644 --- a/public/js/rollup.config.js +++ b/public/rollup.config.js @@ -1,8 +1,8 @@ -export default { - input: 'main.js', +module.exports = { + input: 'js/main.js', output: { - file :'bundle.js', + file :'js/bundle.js', format: 'iife', sourcemap: true, compact: true