-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Support for pre-processors in .vuepress/components #146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Good question, thanks! For using
yarn add sass-loader node-sass -D # for sass
yarn add pug-plain-loader pug -D # for pug Since config for module.exports = {
chainWebpack: config => {
config.module
.rule('pug')
.test(/\.pug$/)
.use('pug-plain-loader')
.loader('pug-plain-loader')
.end()
}
} Then you can create a custom component <template lang="pug">
p.pug {{ msg }}
</template>
<script>
export default {
data () {
return {
msg: 'Hello, Pug'
}
}
}
</script>
<style lang="sass">
.pug
font-size: 20px
</style> Enjoy your writing! |
We should add built-in config for pug and document this in the config section. |
Wonderful! That worked. I don't know if this is worth documenting as well, but I wasn't entirely sure whether I should install the dependencies within the |
fixed at #151 and docs are here: https://vuepress.vuejs.org/guide/using-vue.html#using-pre-processors |
Is there a way to get VuePress to support pre-processors like pug and sass?
The text was updated successfully, but these errors were encountered: