Skip to content

Commit

Permalink
fix: precache issue with netlify.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
ivelin committed May 20, 2020
1 parent f22a1e8 commit ebb4bff
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
// Compress static text assets at build time
const CompressionPlugin = require('compression-webpack-plugin')
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin')

module.exports = {
configureWebpack: {
optimization: {
moduleIds: 'hashed',
runtimeChunk: 'single',
splitChunks: {
minSize: 10000,
maxSize: 250000
maxSize: 250000,
cacheGroups: {
vendor: {
test: /[\\/]node_modules[\\/]/,
name: 'vendors',
chunks: 'all'
}
}
}
}
},
Expand All @@ -24,7 +34,7 @@ module.exports = {
},
workboxPluginMode: 'GenerateSW',
workboxOptions: {
exclude: [/\.map$/, /_redirects/],
exclude: ['/\.map$/', '/_redirects/', '/netlify.toml'],
runtimeCaching: [
{
urlPattern: new RegExp('https://fonts.(?:googleapis|gstatic).com/(.*)'),
Expand Down Expand Up @@ -57,6 +67,8 @@ module.exports = {

// enable build time compression
config.plugin('CompressionPlugin').use(CompressionPlugin)
// VuetifyLoaderPlugin
config.plugin('VuetifyLoaderPlugin').use(VuetifyLoaderPlugin)
},

productionSourceMap: false
Expand Down

0 comments on commit ebb4bff

Please sign in to comment.