Hello,
I have Nx workspace which build my Angular app inside dist/apps/{app_name}
. Even if I use output_dir
option inside my app spec yaml file (seen in the doc) to point to dist/apps/{app_name}
the files taken are, for exemple /apps/front/index.html
instead of /index.html
.
It seems that the default params (_static
, public
or dist
) override the output_dir
option or the default params (here dist
) has priority over output_dir
option.
Is there a solution to use dist/apps/{app_name}
as dir for my Angular app ?
Actually my work-around is to do yarn nx build front && mkdir -p public && mv dist/apps/front/* public && rm -rf dist
which is dirty.
Thanks,
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Hi @scorsi
The
output_dir
option will take priority over the default behavior of checking for a few known directory names (_static
,public
,dist
,build
).It sounds like the
output_dir
option isn’t being set. If you export your app spec in the UI (App -> Settings -> View App Spec), do you see it on the static site?UPDATE (Nov 24, 2020) The control panel now supports the Output Directory option in the component settings.
To set this option properly, you will need to update your app spec via doctl or the API as it is not yet exposed via the Web UI:
doctl apps list
doctl apps spec get APP-UUID > app.yaml
app.yaml
in a text editor and add theoutput_dir
property.doctl apps update --spec app.yaml APP-UUID
. This will kick off a new deploymentLet me know if that works!