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/**/*",