Skip to content

Commit b133be1

Browse files
authored
Merge pull request #42 from armano2/fix/expose-esm-as-module
fix: update build script to include esm and expose it as module for bundlers
2 parents 29562a4 + e22d719 commit b133be1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

build.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "2.1.14",
44
"description": "Vue typescript class and decorator based component.",
55
"main": "dist/index.js",
6+
"module": "dist/esm/index.js",
67
"keywords": [
78
"vue",
89
"class",
@@ -15,9 +16,11 @@
1516
"vue component decorator"
1617
],
1718
"scripts": {
18-
"test-build": "npm run build && npm run test",
19-
"test": "./node_modules/.bin/mocha -r ts-node/register test/test.ts",
20-
"build": "./node_modules/.bin/tsc",
19+
"test-build": "npm run test && npm run build",
20+
"test": "mocha -r ts-node/register test/test.ts",
21+
"build": "npm run build:cjs && npm run build:esm",
22+
"build:cjs": "./node_modules/.bin/tsc",
23+
"build:esm": "./node_modules/.bin/tsc -outDir dist/esm -module ES6",
2124
"lint": "eslint .",
2225
"lint:fix": "eslint . --fix"
2326
},

0 commit comments

Comments
 (0)