Skip to content
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

feat: add options.attachTo #81

Merged
merged 3 commits into from Apr 21, 2020
Merged

feat: add options.attachTo #81

merged 3 commits into from Apr 21, 2020

Conversation

pikax
Copy link
Member

@pikax pikax commented Apr 20, 2020

Tests from here

SSR test not ported, because I'm not sure how to test it.

Note

The reset of the document body now only happens if you don't pass a child, maybe this should be passed as an option?

@lmiller1990
Copy link
Member

Hm, I think we need to reset the body for the majority of cases (except this one).

VTU beta did not mount on the DOM by default. Only with this option. Vue 3 doesn't seem to be able to mount without an element and a DOM... I wonder what the implications of this are.

Code seems fine, I will play with it a bit before merging. thanks for porting this!

@lmiller1990 lmiller1990 self-requested a review April 21, 2020 14:14
src/mount.ts Outdated
@@ -26,6 +26,7 @@ import {
MOUNT_PARENT_NAME
} from './constants'
import { stubComponents } from './stubs'
import { isString } from './utils'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can use isString from lodash. You would need to update the rollup.config.js too.

# Conflicts:
#	rollup.config.js
#	src/mount.ts
#	src/utils.ts
@lmiller1990 lmiller1990 merged commit 6e1d328 into vuejs:master Apr 21, 2020
@lmiller1990
Copy link
Member

Seems good! Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants