-
I am trying to deploy a hybrid rendering nuxt3 app to azure static web apps. I have a few questions.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I managed to get a project based on the https://github.com/Atinux/content-wind template deployed. node version v14.19.3 Use yarn instead of npm Added a couple dev dependencies: Modified the build script in package.json Added an "swa" build script in package.json Building and running with static-web-apps-cli Deployment I forgot the -f when following the instructions to add a .gitkeep file. The build output was complaining about no Api directory was specified, or the specified directory was not found. Azure Functions will not be created. This step is required for a successful deployment as mentioned in the nitro azure preset instructions. mkdir -p .output/server
touch .output/server/.gitkeep
git add -f .output/server/.gitkeep |
Beta Was this translation helpful? Give feedback.
I managed to get a project based on the https://github.com/Atinux/content-wind template deployed.
I gave up on windows and sorted out the issues on linux.
Made the following changes and discoveries
node version v14.19.3
Use yarn instead of npm
Added a couple dev dependencies:
"@azure/static-web-apps-cli": "^1.0.1",
"azure-functions-core-tools": "^4.0.4544",
Modified the build script in package.json
"build": "NITRO_PRESET=azure nuxi build",
Added an "swa" build script in package.json
"swa": "swa start .output/public --api-location .output/server"
Building and running with static-web-apps-cli
yarn
yarn build
yarn swa
Deployment
Followed the instructions in https://nitro.unjs.io/deploy/provi…