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

style tag should not be required #2

Open
gKreator opened this issue Jun 21, 2017 · 6 comments
Open

style tag should not be required #2

gKreator opened this issue Jun 21, 2017 · 6 comments

Comments

@gKreator
Copy link

I get an error when omitting the style tag in a .vue file

image

image

@gKreator
Copy link
Author

gKreator commented Jun 22, 2017

I fixed this error on steal-vue.js with this and all of the styles work properly.
image

I do get an empty style tag in the inspector:
image

@marshallswain
Copy link
Member

@gKreator care to make a PR? Even with an empty style tag, it's an improvement over the current behavior.

@marshallswain
Copy link
Member

Also, thank you for pointing this out!

@gKreator
Copy link
Author

Yup I will do so when I get home tonight. I just learned that both the template tag and the script tag are not required. I know that at least the removal of the script tag causes a fatal error. I did not try removing the template tag, but I am guessing that it will crash as well. If you could point me in the right direction I can try and fix some of this. I have never worked on a steal plugin before.

@marshallswain
Copy link
Member

The script tag will probably have to be required. We should throw a proper error if there's no script because the current implementation depends on it. For the template, I think it just needs to conditionally inject the template string, here: https://github.com/icanjs/steal-vue/blob/master/steal-vue.js#L49

@gKreator
Copy link
Author

image

This is better, I guess you do need a template tag, but now we get a proper error.

image

I will try to fix the other build issue and then I will post the code.

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

No branches or pull requests

2 participants