diff --git a/e2e/expo/src/expo.test.ts b/e2e/expo/src/expo.test.ts index e46ed9ccfc..1946dc3e28 100644 --- a/e2e/expo/src/expo.test.ts +++ b/e2e/expo/src/expo.test.ts @@ -12,6 +12,8 @@ import { runCLIAsync, runE2ETests, killPorts, + createFile, + removeFile, } from 'e2e/utils'; import { join } from 'path'; @@ -159,4 +161,18 @@ describe('@nx/expo', () => { `${appName}/src/app/App.stories.tsx` ); }); + + it('should work with app.config.ts', () => { + const appJson = join(appName, `app.json`); + const appJsonContent = readJson(appJson); + removeFile(appJson); + createFile( + join(appName, 'app.config.ts'), + `export default { expo: { name: 'my-app', slug: 'my-app' } };` + ); + const result = runCLI(`show project ${appName} --json false`); + expect(result).toContain('start:'); + expect(result).toContain('serve:'); + createFile(appJson, JSON.stringify(appJsonContent)); + }); }); diff --git a/packages/expo/plugins/plugin.ts b/packages/expo/plugins/plugin.ts index e0ea1f4c41..fa64d46dcf 100644 --- a/packages/expo/plugins/plugin.ts +++ b/packages/expo/plugins/plugin.ts @@ -53,7 +53,7 @@ export const createDependencies: CreateDependencies = () => { }; export const createNodes: CreateNodes = [ - '**/app.{json,config.js}', + '**/app.{json,config.js,config.ts}', async (configFilePath, options, context) => { options = normalizeOptions(options); const projectRoot = dirname(configFilePath);