diff --git a/packages/graphql-tag-pluck/src/config.ts b/packages/graphql-tag-pluck/src/config.ts index 044270fa578..f2ecf0cb6d1 100644 --- a/packages/graphql-tag-pluck/src/config.ts +++ b/packages/graphql-tag-pluck/src/config.ts @@ -84,7 +84,10 @@ export default function generateConfig( plugins.push('typescript'); break; case '.gjs': - plugins.push('typescript', 'jsx'); + // .gjs files need to be parsed as TypeScript because Ember relies on decorators, which are handled by TypeScript. + // without this, it throws a SyntaxError: Unexpected token, expected "{" + // when native decorators are supported, we should remove this + plugins.push('typescript'); break; default: plugins.push('jsx', ...dynamicFlowPlugins); diff --git a/packages/graphql-tag-pluck/src/index.ts b/packages/graphql-tag-pluck/src/index.ts index 246dfdb011f..430f9c56f47 100644 --- a/packages/graphql-tag-pluck/src/index.ts +++ b/packages/graphql-tag-pluck/src/index.ts @@ -374,16 +374,16 @@ const MissingAstroCompilerError = new Error( const MissingGlimmerCompilerError = new Error( freeText(` - GraphQL template literals cannot be plucked from a Glimmer template code without having the "@glimmer/syntax" package installed. + GraphQL template literals cannot be plucked from a Glimmer template code without having the "content-tag" package installed. Please install it and try again. Via NPM: - $ npm install @glimmer/syntax + $ npm install content-tag Via Yarn: - $ yarn add @glimmer/syntax + $ yarn add content-tag `), );