From 6dac236d18a62fc9a59ec44e26888b48de43c4a1 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Wed, 19 Oct 2022 10:57:36 +0100 Subject: [PATCH] bundle as separate file allowing module to be modular MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Kristján Oddsson --- package.json | 4 ++-- test/karma.config.cjs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b8f66b5..d292151 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@github/time-elements", "version": "3.1.2", - "main": "dist/index.js", + "main": "dist/bundle.js", "type": "module", "module": "dist/index.js", "types": "dist/index.d.ts", @@ -14,7 +14,7 @@ "lint": "eslint . --ext .js,.ts && tsc --noEmit", "lint:fix": "npm run lint -- --fix", "prebuild": "npm run clean && npm run lint && mkdir dist", - "bundle": "esbuild --bundle dist/index.js --keep-names --outfile=dist/index.js --allow-overwrite --format=esm", + "bundle": "esbuild --bundle dist/index.js --keep-names --outfile=dist/bundle.js --format=esm", "build": "tsc && npm run bundle", "prepublishOnly": "npm run build", "pretest": "npm run build", diff --git a/test/karma.config.cjs b/test/karma.config.cjs index 0e11674..66b1df4 100644 --- a/test/karma.config.cjs +++ b/test/karma.config.cjs @@ -4,7 +4,7 @@ module.exports = function (config) { config.set({ frameworks: ['mocha', 'chai'], files: [ - { pattern: '../dist/index.js', type: 'module' }, + { pattern: '../dist/bundle.js', type: 'module' }, 'constructor.js', 'local-time.js', 'relative-time.js',