add basic style to demo

This commit is contained in:
Philipp Kühn
2020-03-06 11:59:36 +01:00
parent c6e003de85
commit 699e5a85b6
8 changed files with 346 additions and 41 deletions

View File

@@ -1,3 +1,15 @@
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',
port: 3000,
@@ -27,5 +39,13 @@ module.exports = {
// typeName: 'People',
// }
// },
]
],
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))
})
},
}