Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#3,999 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
28/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
angular, typescript
領域
build-system, cli

調査の方向性

Ionic 4 Angular プロジェクトで、ドキュメント化されている 2 つの ionic build コマンドを使って動作を再現し、監視対象のファイルとして src/app/tab1/tab1.page.html を使用します。ブラウザーと Cordova の引数処理を比較し、Cordova の build パスが Angular のコンパイルをどのように呼び出すかを確認します。サポートされているワークフローでソースの変更を監視し、Cordova の livereload シナリオ向けに www ディレクトリを更新でき、--watch を拒否しなければ完了です。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
TypeScript
スター
2k
フォーク
681
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ionic-team/ionic-cli のほかの issue

ionic-team/ionic-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。