Skip to content

Commit

Permalink
chore: address PR review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghosh committed Nov 1, 2021
1 parent c183da4 commit 757b26e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { JSONUtilities, pathManager } from 'amplify-cli-core';
import { categoryName } from './constants';

export async function generateCloudFormationFromCDK(resourceName: string) {
const targetDir = path.join(pathManager.getBackendDirPath(), categoryName, resourceName);
const { cdkStack } = require(path.resolve(path.join(targetDir, 'build', 'cdk-stack.js')));
const targetDir = pathManager.getResourceDirectoryPath(undefined, categoryName, resourceName);
const { cdkStack } = await import(path.resolve(path.join(targetDir, 'build', 'cdk-stack.js')));

const customStack: cdk.Stack = new cdkStack(undefined, undefined, undefined, { category: categoryName, resourceName });

Expand Down

0 comments on commit 757b26e

Please sign in to comment.