Skip to content

Commit 25cf6b9

Browse files
committed
fix: update build script to include esm and expose it as module for bundlers
1 parent 08bbc02 commit 25cf6b9

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 build:cjs && npm run test",
20+
"test": "mocha -r ts-node/register test/test.ts",
21+
"build": "npm run build:cjs && npm run build:esm",
22+
"build:cjs": "tsc",
23+
"build:esm": "tsc -outDir dist/esm -module ES6"
2124
},
2225
"author": "",
2326
"license": "MIT",

0 commit comments

Comments
 (0)