Skip to content

Commit

Permalink
transpile undici
Browse files Browse the repository at this point in the history
Undici is not really used but bundler thinks it is going to be used in node 14 so we just transpile it.

trying
  • Loading branch information
saihaj committed May 3, 2022
1 parent fea14ef commit e58d714
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 12 deletions.
4 changes: 3 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const withTM = require('next-transpile-modules')(['undici']) // pass the modules you would like to see transpiled

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
}

module.exports = nextConfig
module.exports = withTM(nextConfig)
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
"@graphql-yoga/node": "2.4.0",
"graphql": "16.4.0",
"next": "12.1.5",
"next-transpile-modules": "^9.0.0",
"react": "18.1.0",
"react-dom": "18.1.0",
"undici": "^5.1.1",
"urql": "^2.2.0"
},
"devDependencies": {
Expand Down
42 changes: 31 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 comment on commit e58d714

@vercel
Copy link

@vercel vercel bot commented on e58d714 May 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.