mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-29 16:48:54 +08:00
48 lines
1019 B
JavaScript
48 lines
1019 B
JavaScript
const path = require('path')
|
|
|
|
function addStyleResource(rule) {
|
|
rule.use('style-resource')
|
|
.loader('style-resources-loader')
|
|
.options({
|
|
patterns: [
|
|
path.resolve(__dirname, './src/variables.scss'),
|
|
],
|
|
})
|
|
}
|
|
|
|
module.exports = {
|
|
siteName: 'tiptap 2',
|
|
titleTemplate: '%s',
|
|
port: 3000,
|
|
plugins: [
|
|
{
|
|
use: '@gridsome/vue-remark',
|
|
options: {
|
|
typeName: 'DocPage',
|
|
baseDir: './src/docPages',
|
|
template: './src/templates/DocPage',
|
|
plugins: [
|
|
'@gridsome/remark-prismjs',
|
|
'remark-container',
|
|
],
|
|
remark: {
|
|
autolinkHeadings: {
|
|
content: {
|
|
type: 'text',
|
|
value: '#'
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
],
|
|
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))
|
|
})
|
|
},
|
|
}
|