Skip to content

Commit

Permalink
bundle as separate file allowing module to be modular
Browse files Browse the repository at this point in the history
Co-authored-by: Kristján Oddsson <koddsson@gmail.com>
  • Loading branch information
keithamus and koddsson committed Oct 19, 2022
1 parent 14b15dc commit 6dac236
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion test/karma.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 6dac236

Please sign in to comment.