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

discussion: add support for "virtual" files? #25

Open
dominicbarnes opened this issue Jul 7, 2017 · 0 comments
Open

discussion: add support for "virtual" files? #25

dominicbarnes opened this issue Jul 7, 2017 · 0 comments

Comments

@dominicbarnes
Copy link
Member

I'm running into a problem writing a new plugin, specifically to compile a .vue file into a require-able module. In short, a .vue file has some HTML (wrapped in <template>), JS (wrapped in <script>) and CSS (wrapped in <style>). Combined, you should be able to "import" (aka: "require") the results and use them in your vue app.

The template compiler takes a string and returns an object with separate properties for each of the aforementioned types. The idea is that you could put any of those into your build system to be processed like any other file. However, mako is trying to run the full gamut of plugins, such as stat but failing because the files don't exist on disk.

One solution I'm throwing around now is adding the notion of "virtual" files, which would bypass some of the usual plugins/hooks. However, it sounds really ambiguous to me, so I'm very hesitant. But I'm also unsure how best to handle this particular use-case. I need some time to think about it, but figured I would lay out my thoughts for me to review later.

@dominicbarnes dominicbarnes changed the title discussion: add support for "virtual" files discussion: add support for "virtual" files? Jul 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant