Skip to content

Commit

Permalink
fix(nextjs): use require.resolve(...) for babel plugin so it works wi…
Browse files Browse the repository at this point in the history
…th pnpm (#4991)
  • Loading branch information
jaysoo authored Mar 10, 2021
1 parent 253adde commit 0dbcd52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/next/babel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ module.exports = function (api, options) {
api.assertVersion(7);
return {
presets: ['next/babel'],
plugins: [['@babel/plugin-proposal-decorators', { legacy: true }]],
plugins: [
[require.resolve('@babel/plugin-proposal-decorators'), { legacy: true }],
],
};
};
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"next": "^10.0.1"
},
"dependencies": {
"@babel/plugin-proposal-decorators": "^7.8.3",
"@babel/plugin-proposal-decorators": "7.8.3",
"@nrwl/react": "*",
"@nrwl/cypress": "*",
"@nrwl/jest": "*",
Expand Down

0 comments on commit 0dbcd52

Please sign in to comment.