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

Compiler tasks #14

Open
5 of 8 tasks
rigor789 opened this issue Mar 15, 2020 · 4 comments
Open
5 of 8 tasks

Compiler tasks #14

rigor789 opened this issue Mar 15, 2020 · 4 comments

Comments

@rigor789
Copy link
Owner

rigor789 commented Mar 15, 2020

Implement template compiler.

  • transforms
    • transformStyle (color: red; -> `{ color: 'red' })
    • transformVText
    • transformModel
    • transformOn
    • transfromShow
    • transformHoist/stringifyStaic (look into what this is used for, and if we need it)
  • tests
    • basic tests to ensure the compiler works (snapshot tests of a couple templates)
    • tests for each transform from above
@rigor789
Copy link
Owner Author

rigor789 commented Mar 19, 2020

Ran into a slight block. In Vue 3 the compiler is much smarter about components/native elements. With the DOM we have the default set of html tags that doesn't really change (for vue-dom) but in ns we always have custom elements from plugins. This is not a problem at runtime, as the registerElement calls are already "called". But if we want to compile a template ahead of time (this is what webpack/vue-loader does), we don't know all the elements.

Providing the isCustomElement option to ParserOptions seems like a possible solution (exploring it right now).

Solved in alpha.10 and 49b6f93

@rigor789
Copy link
Owner Author

rigor789 commented Apr 1, 2020

Waiting for vuejs/core@20f4965 to be released so we can un-comment the tests (they are passing with the above change).

done: 7261b16

@rigor789
Copy link
Owner Author

rigor789 commented Apr 9, 2020

Adjust compiler options to use decodeEntities
Breaking change: vuejs/core@1f6e72b

Resolved by #14 (comment)

@msaelices
Copy link
Collaborator

msaelices commented Apr 13, 2020

Just for the record. The breaking change in the previous comment was fixed in this commit: 903fb22

The code is now working with vue-next 3.0.0-alpha.12

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