tiptap/docs/gridsome.config.js

52 lines
1.1 KiB
JavaScript
Raw Normal View History

2020-03-06 18:59:36 +08:00
const path = require('path')
function addStyleResource(rule) {
rule.use('style-resource')
.loader('style-resources-loader')
.options({
patterns: [
path.resolve(__dirname, './src/variables.scss'),
],
})
}
2019-12-08 04:02:22 +08:00
module.exports = {
siteName: 'TipTap',
port: 3000,
plugins: [
{
use: '@gridsome/vue-remark',
options: {
typeName: 'Post',
2020-04-17 18:55:07 +08:00
baseDir: './src/data',
2019-12-08 04:02:22 +08:00
route: '/posts/:slug',
template: './src/templates/Post.vue',
plugins: [
'@gridsome/remark-prismjs',
[
'@noxify/gridsome-plugin-remark-embed',
{
'enabledProviders' : ['Youtube', 'Twitter', 'Gist'],
},
],
],
}
},
// {
// use: '@gridsome/source-filesystem',
// options: {
// path: './people/**/*.json',
// typeName: 'People',
// }
// },
2020-03-06 18:59:36 +08:00
],
chainWebpack(config) {
// Load variables for all vue-files
const types = ['vue-modules', 'vue', 'normal-modules', 'normal']
types.forEach(type => {
addStyleResource(config.module.rule('scss').oneOf(type))
})
},
2019-12-08 04:02:22 +08:00
}