From cfbb9da5af00336e56a09da73a4760ba0dbf5874 Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Sat, 17 Oct 2020 14:57:29 +0200 Subject: [PATCH] feat(composable): es build --- packages/vue-apollo-composable/package.json | 7 ++++--- packages/vue-apollo-composable/tsconfig.json | 12 ++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/vue-apollo-composable/package.json b/packages/vue-apollo-composable/package.json index fb47149..40cd558 100644 --- a/packages/vue-apollo-composable/package.json +++ b/packages/vue-apollo-composable/package.json @@ -21,14 +21,15 @@ "publishConfig": { "access": "public" }, - "main": "dist/index.js", + "main": "dist/vue-apollo-composable.js", "types": "dist/index.d.ts", + "module": "dist/index.js", "files": [ "dist" ], "scripts": { - "dev": "yarn build --watch", - "build": "tsc --outDir dist -d", + "dev": "tsc --watch --outFile dist/vue-apollo-composable.js", + "build": "tsc --outFile dist/vue-apollo-composable.js && tsc -m es2015 ", "prepublishOnly": "yarn test && yarn build", "test": "yarn test:types", "test:types": "tsc -p tests/types/" diff --git a/packages/vue-apollo-composable/tsconfig.json b/packages/vue-apollo-composable/tsconfig.json index f64a6b5..e5d6cf9 100644 --- a/packages/vue-apollo-composable/tsconfig.json +++ b/packages/vue-apollo-composable/tsconfig.json @@ -1,10 +1,18 @@ { "compilerOptions": { "target": "es5", - "module": "commonjs", + "module": "amd", "sourceMap": true, "allowSyntheticDefaultImports": true, - "skipLibCheck": true + "skipLibCheck": true, + "outDir": "dist", + "moduleResolution": "node", + "lib": [ + "DOM", + "ES2015", + "ES2020.Symbol.WellKnown" + ], + "declaration": true }, "include": [ "src/**/*",