Skip to content

Commit

Permalink
fix(twitter): add components dir to Windi scan options (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz authored Jun 7, 2021
1 parent 93b58d2 commit b6a926b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/twitter/components/Tweet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,22 @@ export default {
}
</script>

<style lang="postcss">
blockquote.tweet {
<style lang="postcss" scoped>
.tweet {
@apply my-5 p-6 pb-3 border border-gray-300 rounded-md mx-auto b-0 not-italic;
@apply dark:border-gray-700;
width: calc(min(100%, 550px)) !important;
& img {
& {
.tweet-quote {
@apply p-3;
}
}
img {
@apply m-0;
}
}
.tweet {
.link {
@apply block;
}
&.tweet-quote {
@apply p-3;
}
.emoji {
@apply w-5 h-5 m-0 inline-block;
}
Expand Down
5 changes: 5 additions & 0 deletions src/twitter/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { resolve } from 'path'
import { Config as WindiConfig } from 'windicss/types/interfaces'
import { Module } from '@nuxt/types'
import { ParserOptions } from '../types'
import tweetDirective from './lib/directive'
Expand All @@ -23,4 +24,8 @@ export default <Module>function docusTwitterModule() {
level: 2
})
})

hook('windicss:options', (windiOptions: WindiConfig) => {
windiOptions.scanOptions.include.push(r('components') + '/*.vue')
})
}

0 comments on commit b6a926b

Please sign in to comment.