Cheers,
I am using ionic-angular. My goal is to deploy to an Azure Static Web App. Thatās been accomplished. However, it doesnāt build using --prod settings. Iāve also tried just to build using the Angular cli (ng build --prod). The web apps loads correctly, but always in development mode.
Itās a very simple app. A prototype/test app really.
Here is my yaml and package.json. Please advise.
Node.js with Angular
Build a Node.js project that uses Angular.
Add steps that analyze code, save build artifacts, deploy, and more:
trigger:
pool:
vmImage: ubuntu-latest
steps:
-
task: NodeTool@0
inputs:
versionSpec: ā14.xā
displayName: āInstall Node.jsā
-
task: Npm@1
displayName: ānpm install -g @angular/cliā
inputs:
command: custom
verbose: true
customCommand: install -g @angular/cli
-
task: Npm@1
displayName: ānpm install -g @ionic/cliā
inputs:
command: custom
verbose: true
customCommand: install -g @ionic/cli
-
task: Npm@1
displayName: ānpm installā
inputs:
command: custom
verbose: true
customCommand: install
-
task: Npm@1
displayName: ānpm run ionic-build-prodā
inputs:
command: custom
verbose: true
customCommand: run ionic-build-prod
-
task: AzureStaticWebApp@0
inputs:
app_location: "/"
output_location: "www"
env:
azure_static_web_apps_api_token: $(deployment_token)
{
ānameā: āapp-devā,
āversionā: ā0.0.1ā,
āauthorā: āIonic Frameworkā,
āhomepageā: āhttps://ionicframework.com/ā,
āscriptsā: {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"ionic-build-prod": "ionic build -c=production",
"ng-build-prod": "ng build --configuration production"
},
āprivateā: true,
ādependenciesā: {
"@angular/common": "~13.0.0",
"@angular/core": "~13.0.0",
"@angular/forms": "~13.0.0",
"@angular/platform-browser": "~13.0.0",
"@angular/platform-browser-dynamic": "~13.0.0",
"@angular/router": "~13.0.0",
"@angular/service-worker": "~13.0.0",
"@capacitor/app": "1.1.0",
"@capacitor/core": "3.4.0",
"@capacitor/haptics": "1.1.4",
"@capacitor/keyboard": "1.2.1",
"@capacitor/status-bar": "1.0.7",
"@ionic/angular": "^6.0.0",
"rxjs": "~6.6.0",
"tslib": "^2.2.0",
"zone.js": "~0.11.4"
},
ādevDependenciesā: {
"@angular-devkit/build-angular": "^13.2.2",
"@angular-eslint/builder": "~13.0.1",
"@angular-eslint/eslint-plugin": "~13.0.1",
"@angular-eslint/eslint-plugin-template": "~13.0.1",
"@angular-eslint/template-parser": "~13.0.1",
"@angular/cli": "~13.0.1",
"@angular/compiler": "~13.0.0",
"@angular/compiler-cli": "~13.0.0",
"@angular/language-service": "~13.0.0",
"@capacitor/cli": "3.4.0",
"@ionic/angular-toolkit": "^5.0.0",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"@typescript-eslint/eslint-plugin": "5.3.0",
"@typescript-eslint/parser": "5.3.0",
"eslint": "^7.6.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsdoc": "30.7.6",
"eslint-plugin-prefer-arrow": "1.2.2",
"jasmine-core": "~3.8.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.2",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.0.3",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"typescript": "~4.4.4"
},
ādescriptionā: āAn Ionic projectā
}