From 47905903275d635a17412ad5e54ec27cce137ba8 Mon Sep 17 00:00:00 2001 From: Jason Hu Date: Mon, 10 Sep 2018 01:15:20 -0700 Subject: [PATCH] Try to resolve workbox warning (#1648) --- webpack.config.js | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 57b4792a6a..740aa2f750 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -155,32 +155,13 @@ function createConfig(isProdBuild, latestBuild) { /hass-icons.js$/, /\.chunk\.js$/, ], - // Static assets get cached during runtime. But these we want to explicitly cache - // Need to be done using templatedUrls because prefix is /static - globDirectory: '.', - globIgnores: [], - modifyUrlPrefix: { - 'hass_frontend': '/static' - }, templatedUrls: { - [`/static/translations/${translationMetadata['translations']['en']['fingerprints']['en']}`]: [ - 'build-translations/output/en.json' - ], - '/static/icons/favicon-192x192.png': [ - 'public/icons/favicon-192x192.png' - ], - '/static/fonts/roboto/Roboto-Light.ttf': [ - 'node_modules/@polymer/font-roboto-local/fonts/roboto/Roboto-Light.ttf' - ], - '/static/fonts/roboto/Roboto-Medium.ttf': [ - 'node_modules/@polymer/font-roboto-local/fonts/roboto/Roboto-Medium.ttf' - ], - '/static/fonts/roboto/Roboto-Regular.ttf': [ - 'node_modules/@polymer/font-roboto-local/fonts/roboto/Roboto-Regular.ttf' - ], - '/static/fonts/roboto/Roboto-Bold.ttf': [ - 'node_modules/@polymer/font-roboto-local/fonts/roboto/Roboto-Bold.ttf' - ], + [`/static/translations/${translationMetadata['translations']['en']['fingerprints']['en']}`]: 'build-translations/output/en.json', + '/static/icons/favicon-192x192.png': 'public/icons/favicon-192x192.png', + '/static/fonts/roboto/Roboto-Light.ttf': 'node_modules/@polymer/font-roboto-local/fonts/roboto/Roboto-Light.ttf', + '/static/fonts/roboto/Roboto-Medium.ttf': 'node_modules/@polymer/font-roboto-local/fonts/roboto/Roboto-Medium.ttf', + '/static/fonts/roboto/Roboto-Regular.ttf': 'node_modules/@polymer/font-roboto-local/fonts/roboto/Roboto-Regular.ttf', + '/static/fonts/roboto/Roboto-Bold.ttf': 'node_modules/@polymer/font-roboto-local/fonts/roboto/Roboto-Bold.ttf', } }), new HtmlWebpackPlugin({