Skip to content

Commit

Permalink
Fix Windows exports map
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloSzx committed Nov 9, 2021
1 parent df33fc4 commit 89a7efc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/build-npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function buildPackageJSON(
* This allows imports without explicit extensions and index imports
* Like `import("graphql/language/parser")` and `import("graphql/utilities")`
*/
for (const srcFile of srcFiles) {
for (const srcFile of srcFiles.map((v) => v.replace(/\\/g, '/'))) {
if (srcFile.endsWith('.ts')) {
const srcFilePath = srcFile.slice(0, srcFile.length - 3);
packageJSON.exports[`./${srcFilePath}`] = `./${srcFilePath}.js`;
Expand Down

0 comments on commit 89a7efc

Please sign in to comment.