sforkowany z mirror/soapbox
Webpack: OfflinePlugin improvements
rodzic
1c39e1b086
commit
a720f3ea32
|
@ -25,7 +25,19 @@ module.exports = merge(sharedConfig, {
|
||||||
new OfflinePlugin({
|
new OfflinePlugin({
|
||||||
caches: {
|
caches: {
|
||||||
main: [':rest:'],
|
main: [':rest:'],
|
||||||
additional: [':externals:'],
|
additional: [
|
||||||
|
'packs/emoji/1f602-*.svg', // used for emoji picker dropdown
|
||||||
|
'packs/images/32-*.png', // used in emoji-mart
|
||||||
|
|
||||||
|
// Default emoji reacts
|
||||||
|
'packs/emoji/1f44d-*.svg', // Thumbs up
|
||||||
|
'packs/emoji/2764-*.svg', // Heart
|
||||||
|
'packs/emoji/1f606-*.svg', // Laughing
|
||||||
|
'packs/emoji/1f62e-*.svg', // Surprised
|
||||||
|
'packs/emoji/1f622-*.svg', // Crying
|
||||||
|
'packs/emoji/1f629-*.svg', // Weary
|
||||||
|
'packs/emoji/1f621-*.svg', // Angry (Spinster)
|
||||||
|
],
|
||||||
optional: [
|
optional: [
|
||||||
'**/locale_*.js', // don't fetch every locale; the user only needs one
|
'**/locale_*.js', // don't fetch every locale; the user only needs one
|
||||||
'**/*_polyfills-*.js', // the user may not need polyfills
|
'**/*_polyfills-*.js', // the user may not need polyfills
|
||||||
|
@ -36,22 +48,10 @@ module.exports = merge(sharedConfig, {
|
||||||
'**/*.svg',
|
'**/*.svg',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
externals: [
|
|
||||||
'/emoji/1f602.svg', // used for emoji picker dropdown
|
|
||||||
'/emoji/sheet_13.png', // used in emoji-mart
|
|
||||||
|
|
||||||
// Default emoji reacts
|
|
||||||
'/emoji/1f44d.svg', // Thumbs up
|
|
||||||
'/emoji/2764.svg', // Heart
|
|
||||||
'/emoji/1f606.svg', // Laughing
|
|
||||||
'/emoji/1f62e.svg', // Surprised
|
|
||||||
'/emoji/1f622.svg', // Crying
|
|
||||||
'/emoji/1f629.svg', // Weary
|
|
||||||
'/emoji/1f621.svg', // Angry (Spinster)
|
|
||||||
],
|
|
||||||
excludes: [
|
excludes: [
|
||||||
'**/*.gz',
|
'**/*.gz',
|
||||||
'**/*.map',
|
'**/*.map',
|
||||||
|
'**/*.LICENSE.txt',
|
||||||
'stats.json',
|
'stats.json',
|
||||||
'report.html',
|
'report.html',
|
||||||
'instance/**/*',
|
'instance/**/*',
|
||||||
|
@ -65,9 +65,10 @@ module.exports = merge(sharedConfig, {
|
||||||
'**/*.ogg',
|
'**/*.ogg',
|
||||||
'**/*.oga',
|
'**/*.oga',
|
||||||
'**/*.mp3',
|
'**/*.mp3',
|
||||||
'sounds/**/*',
|
// Don't serve index.html
|
||||||
// Don't cache index.html
|
// https://github.com/bromite/bromite/issues/1294
|
||||||
'index.html',
|
'index.html',
|
||||||
|
'404.html',
|
||||||
],
|
],
|
||||||
// ServiceWorker: {
|
// ServiceWorker: {
|
||||||
// entry: join(__dirname, '../app/soapbox/service_worker/entry.js'),
|
// entry: join(__dirname, '../app/soapbox/service_worker/entry.js'),
|
||||||
|
|
Ładowanie…
Reference in New Issue