Skip to content

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

@dominicbarnes

Description

@dominicbarnes

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions