Skip to content

Prevent vue-cli templating from colliding with vue's own handlebar {{}} template markers #546

Closed
@bachi76

Description

@bachi76

As suggested by @LinusBorg in #284 (comment) I'll add this as feature request:

Problem: Currently, we cannot use vue-cli's templating feature with a bit larger template projects that contain many vue files, since both use handlebars and the delimiters collide: vue-cli will remove all vue {{}} tags unless \ is used everywhere, which is not reasonable in a larger template project.

Also, when working on the template project, vue will complain about missing data for the template strings used in vue-cli.

Idea: As with handlebars it's not possible to change the delimiters (handlebars-lang/handlebars.js#1184), the only solution seems to be to replace handlebars with e.g. mustache which allows custom delimiters (https://github.com/janl/mustache.js/#custom-delimiters) and works quite similar.

(I'm not sure if this is in scope, but certainly the collisions prevent some nice vue-cli template use-cases, in my case bootstrapping an IoT app which comes already with a basic set of features/vue components).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions