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
[WIP] Feat: add Vue integration #95
Conversation
import { createPlugin } from 'docz-core' | ||
import { VueLoaderPlugin } from 'vue-loader' | ||
|
||
interface BabelRC { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marceloavf you can remove this interface here, typescript already infer this type!
|
||
export const doczPluginVue = () => | ||
createPlugin({ | ||
modifyBabelRc: (babelrc: BabelRC): BabelRC => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, I don't get it here too!
}) | ||
|
||
config.module.rules.push({ | ||
test: /\.css$/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about that and how it can integrate with docz-plugin-css 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should be a good thing too, we could specify it in Playground tag or also in configuration file, in vue we can just set a tag lang="scss"
to change the processor of template
, style
and script
. Might be a way to get it. https://vue-loader.vuejs.org/guide/pre-processors.html#sass
|
||
<script> | ||
export default { | ||
name: 'Alert', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this Alert in the same pattern of others that has in the examples? Changing the background based on the kind property...
babelrc?: boolean | ||
} | ||
|
||
export const doczPluginVue = () => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep the simplicity pattern here, instead of export doczPluginVue
, use just vue
Closed until we figure out the best strategy for that 👍 |
Hi! Any news? |
Still no solution for the parse of proptables, component name conversion and full compatibility tested with render and single file components @artalar. |
What about https://github.com/akxcv/vuera ? |
We are using We also have some problems with babel, as you can see here too akxcv/vuera#46 If you figure out something, feel free to discuss or help us with that integration! |
So, would these problems also exist for plain old |
We need also to make pure render components to work @Aaron-Pool, they both render normally, but we still have an issue with |
Ok! I'll look through the vue branch you have set up and see if there's anything I can think of worth suggesting. Thanks for the quick response! |
Ok, so, just a thought after poking around for a bit, instead of using
Then you could conditionally skip adding Or, if you didn't want to worry about conditionally skipping the I've never done a webpack loader before, but if the theory sounds alright I would consider putting some time into a PR. But I wouldn't want to commit any time to it if that sounds like too messy of an approach to you. |
Great ideas @Aaron-Pool, I was thinking about a while ago about abandon Also saw I'll try to rebase the Thank you again! |
Got my contributor environment set up last night and started messing with creating a webpack loader. Totally haven't forgotten about this! 👍 |
Description
This pull request support Vue integration
Review
Pre-merge checklist
<PropsTable>
integration<Playground>
integration