Skip to content

Commit

Permalink
Set allowJs in TypeScript build config
Browse files Browse the repository at this point in the history
* The `/proto` directory was not being compiled in the released package,
  because it only contains `.js` and `.d.ts` files, as opposed to `.ts`
  files
* This caused an import error when trying to use the built package,
  because `compiled.js` and `compiled.ts` were not present
* When building the project for release (with `tsconfig.build.json`), set
  `allowJs: true`, so that the TypeScript compiler will include these
  files in the package
  • Loading branch information
brimtown committed Dec 8, 2020
1 parent 95bb12b commit 63cf333
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./dist",
"noEmit": false
"noEmit": false,
"allowJs": true
},
"include": ["src"]
}

0 comments on commit 63cf333

Please sign in to comment.