This question is related to React + backend - project structure when sharing code, but is aimed at Javascript (not TypeScript) and deployement onto a Azure Static Web App resource
I want to get my project as below, separating the front and the api source code.
root
├── common
| ├── classes
| └── helpers
│ └── ...
├── api
| ├── node_modules
| ├── functions
│ │ └── ...
| ├── package-lock.json
| |── package.json
| └── ...
└── frontend (created using vite+React+Javascript)
├── node_modules
├── public
├── src
| ├── App.jsx
│ └── ...
├── package-lock.json
|── package.json
└── ...
I'm stuck at writing the last step of the Azure pipelines:
- task: AzureStaticWebApp@0
inputs:
app_location: 'frontend'
api_location: 'api'
output_location: 'dist'
azure_static_web_apps_api_token: $(deployment_token)
Is the a way to tell the pipeline to copy the common directory at the same location of api and the frontend directories?
npm pack) from the shared directory and then install it both inapiandfrontend