Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Unable to serve to disk while using ionic build --engine=cordova

Offen
#3,999 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
28/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
angular, typescript
Bereich
build-system, cli

Rechercherichtung

Reproduziere das Verhalten mit den beiden dokumentierten ionic build-Befehlen im Ionic 4 Angular-Projekt und verwende dabei src/app/tab1/tab1.page.html als überwachte Datei. Vergleiche die Verarbeitung der Argumente im Browser und in Cordova und prüfe, wie der Cordova-Build-Pfad die Angular-Kompilierung aufruft. Erledigt ist die Aufgabe, wenn ein unterstützter Workflow Quellcodeänderungen überwacht und das www-Verzeichnis für Cordova-Livereload-Szenarien aktualisiert, ohne --watch abzulehnen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

triage

Description:

Ionic 4 Angular project supports serving to disk with on-the-fly compiling of sources for browser engine by calling ionic build --engine=browser -- --watch. In that case if any change to assets is made than www directory is updated.
But there are no such option for cordova engine, i.e. if I call ionic build --engine=cordova --platform=android -- --watch then Unknown option: '--watch' appears.
AFAIK previous Angular project template has this feature (you could use just ionic serve --no-open to get the same behavior as for Ionic 4 browser engine).
In other words, Angular 4 project doesn't provide an ability to watching over sources and compile cordova-compatible assets on the fly. Eventually, it breaks cordova-simulate livereload scenarios and, consequently, Cordova Extension for VS Code simulate scenarios with livereload enabled https://github.com/microsoft/vscode-cordova/issues/532#issuecomment-496563067.

In general, if there are any other ways of how to achieve compiling of Ionic 4 angular project with cordova integrated and livereload then it would be enough.

Steps to Reproduce:

  • Create Ionic 4 angular project:
ionic start ionic4app tabs --cordova --type=angular --no-link
cd ionic4app
ionic cordova platform add android
  • Run ionic build --engine=browser -- --watch, then change e.g. src/app/tab1/tab1.page.html and see that www directory is updated
  • Run ionic build --engine=cordova --platform=android -- --watch and see Unknown option: '--watch' error is appeared.

My ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.12.0 (/home/akvelon/.nvm/versions/node/v12.0.0/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.4.2
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.1.4, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 4 other plugins)

System:

   Android SDK Tools : 26.1.1 (/work/sdk)
   NodeJS            : v12.0.0 (/home/akvelon/.nvm/versions/node/v12.0.0/bin/node)
   npm               : 6.9.0
   OS                : Linux 4.15
Vorherrschende Sprache
TypeScript
Sterne
2k
Forks
681
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus ionic-team/ionic-cli

Alle Issues in ionic-team/ionic-cli

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.