diff --git a/index.html b/index.html index d15aa62f1..6ba0b2143 100644 --- a/index.html +++ b/index.html @@ -25,8 +25,8 @@
+ - \ No newline at end of file diff --git a/source/components/inFranceApp/Steps/Cost and benefits/index.js b/source/components/inFranceApp/Steps/Cost and benefits/index.js index 599c96175..c87cb2d7c 100644 --- a/source/components/inFranceApp/Steps/Cost and benefits/index.js +++ b/source/components/inFranceApp/Steps/Cost and benefits/index.js @@ -8,7 +8,7 @@ import * as Animate from '../../animate' type Props = { hideText: boolean } -class Hiring extends Component { +class Hiring extends Component { render() { return ( diff --git a/source/entry.js b/source/entry.js index aa2147704..8d92cc2db 100644 --- a/source/entry.js +++ b/source/entry.js @@ -84,7 +84,7 @@ export { anchor } if ('serviceWorker' in navigator) { window.addEventListener('load', () => { navigator.serviceWorker - .register('/sw.js') + .register('/dist/sw.js') .then(registration => { console.log('SW registered: ', registration) }) diff --git a/source/webpack.common.js b/source/webpack.common.js index 25db0228b..9fc6c03cb 100644 --- a/source/webpack.common.js +++ b/source/webpack.common.js @@ -13,7 +13,8 @@ module.exports = { }, output: { path: path.resolve('./dist/'), - filename: '[name].js' + filename: '[name].js', + publicPath: '/dist/' }, module: { rules: [ @@ -81,7 +82,7 @@ module.exports = { runtimeCaching: [ { urlPattern: new RegExp( - 'https://fonts.(?:googleapis|gstatic).com/(.*)' + 'https://fonts.(?:googleapis|gstatic).com/(.*)|https://cdn.polyfill.io/v2/polyfill.min.js' ), handler: 'cacheFirst', options: { @@ -93,24 +94,6 @@ module.exports = { statuses: [0, 200] } } - }, - { - urlPattern: /\.(?:js|css)$/, - handler: 'staleWhileRevalidate', - options: { - cacheName: 'static-resources' - } - }, - { - urlPattern: /\.(?:png|gif|jpg|jpeg|svg)$/, - handler: 'cacheFirst', - options: { - cacheName: 'images', - expiration: { - maxEntries: 60, - maxAgeSeconds: 30 * 24 * 60 * 60 // 30 Days - } - } } ] })