Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion packages/core/.babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@ const { babelOptimizerPlugin } = require('@graphql-codegen/client-preset')

module.exports = {
presets: ['next/babel'],
/** Replaces gql function calls for imports to the document data */
plugins: [
/** Replaces gql function calls for imports to the document data */
[
babelOptimizerPlugin,
{ artifactDirectory: './@generated', gqlTagName: 'gql' },
],
/**
* With modern browserslist targets, `next/babel` skips the private-methods
* transform but still applies class-properties, which then throws on
* `#method()`. Middleware dependencies get transpiled too, so a private
* method in a dependency such as `jose` is enough to fail the build.
* Enabling this unconditionally keeps the build off caniuse-lite drift.
*/
'@babel/plugin-transform-private-methods',
],
}
3 changes: 2 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"sideEffects": false,
"dependencies": {
"@antfu/ni": "^0.21.12",
"@babel/plugin-transform-private-methods": "7.25.9",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"@builder.io/partytown": "^0.6.1",
"@envelop/core": "^5.0.2",
"@envelop/graphql-jit": "^8.0.3",
Expand Down Expand Up @@ -88,7 +89,7 @@
"idb-keyval": "^5.1.3",
"include-media": "^1.4.10",
"isomorphic-unfetch": "^3.1.0",
"jose": "^6.2.3",
"jose": "6.2.8",
"lexical": "^0.34.0",
"next": "^13.5.9",
"next-logger": "^5.0.2",
Expand Down
13 changes: 8 additions & 5 deletions pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"build": {
"dependsOn": ["^build"],
"env": ["BASE_SITE_URL"],
"outputs": ["dist/**"]
"outputs": ["dist/**", "@generated/**"]
},
"test": {
"dependsOn": ["^build"]
Expand Down
Loading