Skip to content

Commit

Permalink
fix(capacitor): align default web-dir for esbuild executor
Browse files Browse the repository at this point in the history
Cover non-angular apps
  • Loading branch information
pawel-twardziak committed Nov 3, 2024
1 parent 2516059 commit df7d67d
Showing 1 changed file with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@ export function normalizeOptions(
options: CapacitorConfigurationSchema
): NormalizedSchema {
const appName = options.appName ? options.appName : options.project;
const {
root,
targets: {
build: {
executor,
options: { outputPath, browser },
},
},
} = readProjectConfiguration(host, options.project);
const { root, targets } = readProjectConfiguration(host, options.project);
const executor = targets?.build?.executor;
const outputPath = targets?.build?.options?.outputPath;
const browser = targets?.build?.options?.browser;

const esbuildBrowser =
[
Expand All @@ -31,7 +26,9 @@ export function normalizeOptions(

const webDir = options.webDir
? options.webDir
: joinPathFragments(`${outputPath}${esbuildBrowser ? '/browser' : ''}`);
: outputPath
? joinPathFragments(`${outputPath}${esbuildBrowser ? '/browser' : ''}`)
: joinPathFragments('dist', root);

return {
...options,
Expand Down

0 comments on commit df7d67d

Please sign in to comment.