GoogleChromeLabs / sw-precache

[Deprecated] A node module to generate service worker code that will precache specific resources so they work offline.
https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
Apache License 2.0
5.22k stars 388 forks source link

Ignore bower_components in staticFileGlobs #311

Closed mbj36 closed 7 years ago

mbj36 commented 7 years ago

Hi I have bower_components directory inside app ( app is my root directory ) and i am using staticFileGlobs: [ rootDir + '/**/*.{js,html,css,scss,png,jpg,gif,svg,eot,ttf,woff,json}' ] which also caches bower_components directory but i want to exclude that directory

I am trying this but this doesn't work

staticFileGlobs: [ rootDir + '/**/*.{js,html,css,scss,png,jpg,gif,svg,eot,ttf,woff,json}', rootDir + '/!bower_components{,/**/*}' ],

jeffposnick commented 7 years ago

Tracked in #97