-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make module server configurable #163
Conversation
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 a killer feature @calebeby !
I'm still wrapping my head around this codebase, but these changes seem reasonable 👍 One nitpick about an error message inline.
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.
Super cool feature, great work, @calebeby!
I'm in the same boat as @Paul-Hebert where I don't understand every line of code fully but overall, the code looks good! Pending the suggestion from Paul, I approve!
Thanks for the reviews @Paul-Hebert and @gerardo-rodriguez! Do you mind taking a look at the README changes that I just pushed as well? |
@calebeby the README info looks good! I left a couple questions inline. |
Closes #140
The code is all ready for review. I didn't update the README yet.
This makes it possible to configure the module server in each test. You could inject additional rollup plugins, etc. An example of this is to add a plugin to load Vue SFC's:
There is also a
configureDefaults
function exported by pleasantest, so you don't have to set the options for each test individually:There is also an internal change: File
id
s (used by the rollup plugins) are now absolute paths once they are resolved. This was changed to match Rollup's default behavior, and it fixed a compatibility issue with rollup-plugin-vue. So the ids start out as url's, which are relative to the project root, then they get converted to absolute paths, and run through all the plugins, and at the very end before the module is served they get converted back into paths that are relative to the project root.