Unverified Commit 9c2c8587 authored by Donny/강동윤's avatar Donny/강동윤 Committed by GitHub

feat(next-swc/relay): Add `javascript` to language (#42894)

Resolves
https://github.com/vercel/next.js/discussions/35904#discussioncomment-3299461
parent 4ca30fe4
......@@ -15,6 +15,7 @@ use swc_core::{
#[serde(rename_all = "lowercase")]
pub enum RelayLanguageConfig {
TypeScript,
JavaScript,
Flow,
}
......@@ -99,6 +100,9 @@ impl<'a> Relay<'a> {
RelayLanguageConfig::TypeScript => {
format!("{}.graphql.ts", definition_name)
}
RelayLanguageConfig::JavaScript => {
format!("{}.graphql.js", definition_name)
}
};
if let Some(artifact_directory) = &self.config.artifact_directory {
......
......@@ -48,7 +48,7 @@ export function getServerSideProps() {
None,
handler,
&Default::default(),
comments.clone(),
comments,
|_| next_ssg(eliminated_packages.clone()),
|_| noop(),
)
......
......@@ -460,7 +460,7 @@ export interface NextConfig extends Record<string, any> {
relay?: {
src: string
artifactDirectory?: string
language?: 'typescript' | 'flow'
language?: 'typescript' | 'javascript' | 'flow'
}
removeConsole?:
| boolean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment