Skip to content

Commit

Permalink
fix(nextjs): output path for standalone apps
Browse files Browse the repository at this point in the history
  • Loading branch information
ndcunningham committed Apr 21, 2023
1 parent a908ef5 commit 8a65081
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/next/src/generators/application/lib/add-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ import {
export function addProject(host: Tree, options: NormalizedSchema) {
const targets: Record<string, any> = {};

const outputPath = joinPathFragments(
'dist',
options.appProjectRoot,
...(options.rootProject ? [options.name] : [])
);
targets.build = {
executor: '@nx/next:build',
outputs: ['{options.outputPath}'],
defaultConfiguration: 'production',
options: {
root: options.appProjectRoot,
outputPath: joinPathFragments('dist', options.appProjectRoot),
outputPath: outputPath,
},
configurations: {
development: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export function createApplicationFiles(host: Tree, options: NormalizedSchema) {
...(updatedJson.exclude || []),
...(appJSON.exclude || []),
'**e2e/**/*',
`dist/${options.name}/**/*`,
]),
],
};
Expand Down

0 comments on commit 8a65081

Please sign in to comment.