-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
@mdx-js/vue: context, createElement and mdx-js/vue-loader #1008
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
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/mdx/mdx/gees4z27n |
packages/vue-loader/test/test.js
Outdated
| const module = stats.toJson().modules.find(m => m.name === fileName) | ||
| .source | ||
| resolve(module) | ||
| if (stats.hasErrors()) reject(new Error(stats.toJson().errors)) |
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 ended up not running this because it was a little confusing to get webpack to obey me. I kept getting some fs.join errors that were beyond my current ability to quickly debug. so I skipped the test assertion below.
Well it wasn't running before so... 😅 Happy to get contributions toward this!
| @@ -1,105 +0,0 @@ | |||
| function toVueJSX(node, parentNode = {}, options = {}) { | |||
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 deleted these files because they weren't being utilized. 🙏🏽 Please let me know if you think I should keep them. I figured we could recover them with git.
| @@ -0,0 +1,57 @@ | |||
| const components = { | |||
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.
This is the a test utility file being consumed by the mdx-provider.test.js file
ChristopherBiscardi
left a comment
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.
Awesome! Thanks so much for moving this forward!
I still have to take this and run it locally. From a cursory overview it seems reasonable though. We should try to get those tests running that aren't currently. I have some webpack experience so I can take a look at the join issue.
packages/vue-loader/test/test.js
Outdated
| const webpack = require('webpack') | ||
| const MemoryFs = require('memory-fs') | ||
| const {VueJSXCompiler} = require('@mdx-js/vue') | ||
| const {createFsFromVolume, Volume} = require('memfs') |
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.
ah nice, I missed that memory-fs was deprecated.
|
Thanks for the review. I'll also look into getting @vue/test-utils to run |
|
instead of force-pushing over this PR, I made some necessary changes to test infra, etc and continued the work in #1029 |
|
Noted 👍 |
wrapperandinlineCodecomponentExample: https://mdx-vue.now.sh/
Sadly I wasn't able get the tests to run for the vue-loader package.