Enable treesharking on vuetify

This commit is contained in:
Thog 2020-02-10 17:08:15 +01:00
parent da7f8c46a6
commit e34ed9e265
4 changed files with 21 additions and 2 deletions

View file

@ -25,5 +25,12 @@ module.exports = {
config: {} config: {}
} }
} }
] ],
css: {
loaderOptions: {
scss: {
// options here will be passed to sass-loader, nothing for now.
}
}
}
} }

View file

@ -1,4 +1,5 @@
const nodeExternals = require('webpack-node-externals') const nodeExternals = require('webpack-node-externals')
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin')
const fs = require('fs') const fs = require('fs')
function addJSONCollection(actions,typeName, path) { function addJSONCollection(actions,typeName, path) {
@ -23,6 +24,12 @@ module.exports = function (api) {
} }
}) })
api.configureWebpack({
plugins: [
new VuetifyLoaderPlugin()
]
})
api.loadSource(async actions => { api.loadSource(async actions => {
addJSONCollection(actions, "Team", "./content/team.json") addJSONCollection(actions, "Team", "./content/team.json")
addJSONCollection(actions, "SocialNavbarElements", "./content/ui/navbar/social.json") addJSONCollection(actions, "SocialNavbarElements", "./content/ui/navbar/social.json")

View file

@ -14,10 +14,15 @@
}, },
"devDependencies": { "devDependencies": {
"@gridsome/plugin-sitemap": "^0.2.3", "@gridsome/plugin-sitemap": "^0.2.3",
"deepmerge": "^4.2.2",
"eslint": "^6.8.0", "eslint": "^6.8.0",
"eslint-plugin-vue": "^6.1.2", "eslint-plugin-vue": "^6.1.2",
"eslint-plugin-vuetify": "^1.0.0-beta.5", "eslint-plugin-vuetify": "^1.0.0-beta.5",
"fibers": "^4.0.2",
"gridsome-plugin-robots-txt": "^1.0.2", "gridsome-plugin-robots-txt": "^1.0.2",
"sass": "^1.25.0",
"sass-loader": "7.3.1",
"vuetify-loader": "^1.4.3",
"webpack-node-externals": "^1.7.2" "webpack-node-externals": "^1.7.2"
} }
} }

View file

@ -1,4 +1,4 @@
import Vuetify from 'vuetify' import Vuetify from 'vuetify/lib'
import 'vuetify/dist/vuetify.min.css' import 'vuetify/dist/vuetify.min.css'
import '~/external/fontawesome/css/fontawesome-all.css' import '~/external/fontawesome/css/fontawesome-all.css'
import DefaultLayout from '~/layouts/Default.vue' import DefaultLayout from '~/layouts/Default.vue'