offline-plugin
Advanced tools
Changelog
4.0.0 - 4.5.3
relativePaths
is now automatically set to false
when publicPath
is usedpublicPath
now uses webpack.config.js
's output.publicPath
by default (when not set in OfflinePlugin
itself)AppCache.output
which is replacement for AppCache.directory
. The last is deprecated nowServiceWorker.publicPath
and AppCache.publicPath
:externals:
keyword for caches. When used, keyword is replaced with URLs listed in externals
optioncaches: 'all'
is now equivalent of caches: { main: [':rest:', ':externals:'] }
. In other words, externals
URLs are now included in caches
by defaultoffline-plugin
are now exposed as require('offline-plugin').defaultOptions
ignoreSearch
isn't applied to assets added with externals
anymore. i.e. full URLs with ?query
can now be added to the cachesresponseStrategy
option. Thanks to @MoOx. #112ServiceWorker.cacheName
option. Useful (but very dangerous) when you need to run more than one project on the same domainupdateStrategy
default to 'changed'
ServiceWorker.prefetchRequest
optionServiceWorker
/AppCache
filescacheMaps
optionAppCache.includeCrossOrigin = true
minimatch
to 3.*Changelog
3.4.0
ServiceWorker.navigateFallbackURL
option (see #71)runtime.js
when used without OfflinePlugin
in webpack.config.js
(see #74)Changelog
3.3.0
relativePaths: true
is used (#39, #60)scope
option to ServiceWorker (#19). See ServiceWorker.register docs.Changelog
3.0.0 - 3.2.0
__uncache=${ Date.now() }
)scope
option to publicPath
(scope
is deprecated now and will produce warnings upon use)publicPath: ''
(empty string) by defaultrelativePaths: true
by default'additional'
and 'optional'
are now allowed only when updateStrategy
option is set to 'changed'
changed
is now default updateStrategy
and hash
strategy is gone. offline-plugin
now uses webpack's build hashes to apply change
update strategy even when generate file names are the same. Issue 6. More details about change in docs.updateStrategy
is now using version
option for its version tagversion
now is not set by default and returns (when not set, e.g. default) compilation hash for updateStrategy: 'changed'
and version
for updateStrategy: 'all'
version
now has interpolation value, use [hash]
to insert compilation hash to your version stringinstall()
method signature now is install(options)
(callbacks are removed)onUpdating
, onUpdateReady
, onUpdated
, onInstalled
.runtime.install({ onInstalled: () => ... })
applyUpdate()
method to runtimecaches
as any other assets (they are required to be marked as externals
)