2020-02-07 16:08:14 +01:00
|
|
|
const nodeExternals = require('webpack-node-externals')
|
2020-02-07 19:55:39 +01:00
|
|
|
const fs = require('fs')
|
2020-02-07 16:08:14 +01:00
|
|
|
|
|
|
|
module.exports = function (api) {
|
|
|
|
api.chainWebpack((config, { isServer }) => {
|
|
|
|
if (isServer) {
|
|
|
|
config.externals([
|
|
|
|
nodeExternals({
|
|
|
|
whitelist: [/^vuetify/]
|
|
|
|
})
|
|
|
|
])
|
|
|
|
}
|
|
|
|
})
|
2020-02-07 19:55:39 +01:00
|
|
|
|
|
|
|
api.loadSource(async actions => {
|
|
|
|
const teamList = JSON.parse(fs.readFileSync("./content/team.json"))
|
|
|
|
const teamCollection = actions.addCollection({
|
|
|
|
typeName: 'Team'
|
|
|
|
})
|
|
|
|
|
|
|
|
for (const teamMember of teamList) {
|
|
|
|
|
|
|
|
teamMember.description = teamMember.description | ""
|
|
|
|
teamCollection.addNode(teamMember)
|
|
|
|
}
|
|
|
|
})
|
2020-02-07 16:08:14 +01:00
|
|
|
}
|