ℹ️ For all later changes, please see https://github.com/NekR/offline-plugin/releases
- Fix TypeScript typings
- [Internals]: Async
waitUntil
is now a thing (polyfilled) - Added
TypeScript
definitions - RegExp support in cache paths #205
- Added
ServiceWorker.minify
option to force to minify #204 & #206 - Allow ServiceWorker to be installed on any local IP (
127.*.*.*
) #251 - Ship
ServiceWorker.minify
option which controls if ServiceWorker's code will be minified or not
- ServiceWorker can now be registered at
127.0.0.1
#188 - New
ServiceWorker.navigateFallbackForRedirects
option which istrue
by default (compatibility reasons) #230 - Fixed new security restriction introduced in browsers regardless navigation requests and redirects #231
- Wrap
applicationCache.update()
withtry..catch
#189
- Fixed syntax error in
runtime-template.js
- Fixed compatibility with
hard-source-webpack-plugin
#148 - Added
autoUpdate
option andruntime.update()
method #169
- Fix
request.headers
typo invalidatePrefetch
which was preventing setting custom headers for prefetch requests
- Use
compilation.errors
instead ofcallback(new Error('...'))
when runtime is missing
relativePaths
is now automatically set tofalse
whenpublicPath
is usedpublicPath
now useswebpack.config.js
'soutput.publicPath
by default (when not set inOfflinePlugin
itself)- Added
AppCache.output
which is replacement forAppCache.directory
. The last is deprecated now - Added
ServiceWorker.publicPath
andAppCache.publicPath
- Added
:externals:
keyword for caches. When used, keyword is replaced with URLs listed inexternals
option caches: 'all'
is now equivalent ofcaches: { main: [':rest:', ':externals:'] }
. In other words,externals
URLs are now included incaches
by default- Default options of
offline-plugin
are now exposed asrequire('offline-plugin').defaultOptions
ignoreSearch
isn't applied to assets added withexternals
anymore. i.e. full URLs with?query
can now be added to the caches- Added
responseStrategy
option. Thanks to @MoOx. #112 - Added
ServiceWorker.cacheName
option. Useful (but very dangerous) when you need to run more than one project on the same domain - Make
updateStrategy
default to'changed'
- Added
ServiceWorker.prefetchRequest
option - Plugin now outputs its version to generated
ServiceWorker
/AppCache
files - Implemented
cacheMaps
option - Made AppCache to not include cross origin URLs by default (because they don't work there on HTTPS). Could be returned back with
AppCache.includeCrossOrigin = true
- Dropped Node 0.10, Node 0.12 and IO.js support
- Updated
minimatch
to 3.* - Add AppVeyor CI tests
- Added
ServiceWorker.navigateFallbackURL
option (see #71) - Added warning about development mode in
runtime.js
when used withoutOfflinePlugin
inwebpack.config.js
(see #74)
- Fixed absolute URLs being prefixed with relative path when
relativePaths: true
is used (#39, #60) - Added
scope
option to ServiceWorker (#19). See ServiceWorker.register docs.
- All assets are now requested cache-bust query parameter (
__uncache=${ Date.now() }
) - Assets matching in caches now ignores search (query) path of URLs
- Rename
scope
option topublicPath
(scope
is deprecated now and will produce warnings upon use) - Make
publicPath: ''
(empty string) by default - Make
relativePaths: true
by default - Cache sections
'additional'
and'optional'
are now allowed only whenupdateStrategy
option is set to'changed'
changed
is now defaultupdateStrategy
andhash
strategy is gone.offline-plugin
now uses webpack's build hashes to applychange
update strategy even when generate file names are the same. Issue 6. More details about change in docs.- Any of
updateStrategy
is now usingversion
option for its version tag version
now is not set by default and returns (when not set, e.g. default) compilation hash forupdateStrategy: 'changed'
andversion
forupdateStrategy: 'all'
version
now has interpolation value, use[hash]
to insert compilation hash to your version stringinstall()
method signature now isinstall(options)
(callbacks are removed)- Runtime events are not implemented for ServiceWorker (and some for AppCache):
onUpdating
,onUpdateReady
,onUpdated
,onInstalled
.
Example:runtime.install({ onInstalled: () => ... })
- Added
applyUpdate()
method to runtime - Absolute URLs can now be specified in
caches
as any other assets (they are required to be marked asexternals
) - Added basic test and Travis CI
- Disallow pattern matching in
externals
- Allow pattern matching in
externals
- Added
relativePaths
option. Whentrue
, all generated paths are relative toServiceWorker
file orAppCache
folder. Useful in cases when app isn't in the root of domain, e.g. Github Pages. Settingscope
to''
(empty string) is the same now asrelativePaths: true
. - Added
excludes
option to exclude assets from caches. Exclusion is global and is performed before any assets added to cache sections. - Not specified sections in caches now equals to empty selection. Previously,
:rest:
keyword was added automatically, now isn't. - ':rest:' keyword is now handled after all caches sections were handled. Previously it was handled immediately when found.
- Plugin now throws an error when keyword
:rest:
is used more than once. ServiceWorker
generation now used Child Compilation instead weird hacks with entry injections.
Improved ServiceWorker
entry generation: use compilation.namedChunks
instead of compilation.assets
to access service-entry and replace it. See #10 for more details.
Added FALLBACK
back section for AppCache
and fixed generation of a NETWORK
section.
Remove support of multi-stage caching from AppCache
. Reason is that files cached in second manifest cannot be accessed from page cached by first one, since NETWORK
section can only dictate to use network (*
) or nothing (pretend offline), but not fallback to browser defaults. This means that any attempt to access files of second manifest goes to the network or fails immediately, instead of reading from cache.
Fix ServiceWorker
login to not cache additional
's section assets on activate
event, instead, cache them without blocking any events. Other ServiceWorker
logic fixes.
Release