ℹ️ For all later changes, please see https://github.com/NekR/offline-plugin/releases
- Fix TypeScript typings
- [Internals]: Async
waitUntilis now a thing (polyfilled) - Added
TypeScriptdefinitions - RegExp support in cache paths #205
- Added
ServiceWorker.minifyoption to force to minify #204 & #206 - Allow ServiceWorker to be installed on any local IP (
127.*.*.*) #251 - Ship
ServiceWorker.minifyoption which controls if ServiceWorker's code will be minified or not
- ServiceWorker can now be registered at
127.0.0.1#188 - New
ServiceWorker.navigateFallbackForRedirectsoption which istrueby 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
autoUpdateoption andruntime.update()method #169
- Fix
request.headerstypo invalidatePrefetchwhich was preventing setting custom headers for prefetch requests
- Use
compilation.errorsinstead ofcallback(new Error('...'))when runtime is missing
relativePathsis now automatically set tofalsewhenpublicPathis usedpublicPathnow useswebpack.config.js'soutput.publicPathby default (when not set inOfflinePluginitself)- Added
AppCache.outputwhich is replacement forAppCache.directory. The last is deprecated now - Added
ServiceWorker.publicPathandAppCache.publicPath - Added
:externals:keyword for caches. When used, keyword is replaced with URLs listed inexternalsoption caches: 'all'is now equivalent ofcaches: { main: [':rest:', ':externals:'] }. In other words,externalsURLs are now included incachesby default- Default options of
offline-pluginare now exposed asrequire('offline-plugin').defaultOptions ignoreSearchisn't applied to assets added withexternalsanymore. i.e. full URLs with?querycan now be added to the caches- Added
responseStrategyoption. Thanks to @MoOx. #112 - Added
ServiceWorker.cacheNameoption. Useful (but very dangerous) when you need to run more than one project on the same domain - Make
updateStrategydefault to'changed' - Added
ServiceWorker.prefetchRequestoption - Plugin now outputs its version to generated
ServiceWorker/AppCachefiles - Implemented
cacheMapsoption - 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
minimatchto 3.* - Add AppVeyor CI tests
- Added
ServiceWorker.navigateFallbackURLoption (see #71) - Added warning about development mode in
runtime.jswhen used withoutOfflinePlugininwebpack.config.js(see #74)
- Fixed absolute URLs being prefixed with relative path when
relativePaths: trueis used (#39, #60) - Added
scopeoption 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
scopeoption topublicPath(scopeis deprecated now and will produce warnings upon use) - Make
publicPath: ''(empty string) by default - Make
relativePaths: trueby default - Cache sections
'additional'and'optional'are now allowed only whenupdateStrategyoption is set to'changed' changedis now defaultupdateStrategyandhashstrategy is gone.offline-pluginnow uses webpack's build hashes to applychangeupdate strategy even when generate file names are the same. Issue 6. More details about change in docs.- Any of
updateStrategyis now usingversionoption for its version tag versionnow is not set by default and returns (when not set, e.g. default) compilation hash forupdateStrategy: 'changed'andversionforupdateStrategy: 'all'versionnow 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
cachesas 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
relativePathsoption. Whentrue, all generated paths are relative toServiceWorkerfile orAppCachefolder. Useful in cases when app isn't in the root of domain, e.g. Github Pages. Settingscopeto''(empty string) is the same now asrelativePaths: true. - Added
excludesoption 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. ServiceWorkergeneration 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