LoginSignup
0
0

More than 1 year has passed since last update.

service workerを使ったアプリでworkboxのログを表示しないようにする

Last updated at Posted at 2021-08-01

next.jsのプロジェクトを触っていて、consoleでworkboxのログが非常に邪魔(filterかけれない・・・)だったのでdisableにする方法を探す。

5f70628da13d2f73a4a43db096002326.png

ここに書いてあった
Configure Workbox - Disable Logging

というわけでやってみる。

プロジェクトのルートディレクトリで以下のコマンド

mkdir worker
echo "self.__WB_DISABLE_DEV_LOGS=true" > worker/index.js

service workerをunregisterして再登録されるようにするか、起動し直せば反映🥱

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0