Skip to content

Fix compatibility with vue-meta (htmlAttrs, bodyAttrs, ...) #123

@frankfoerster

Description

@frankfoerster

Version: v0.5.0

Problem

The plugin currently minifies the html template and converts all characters to lowercase.

This breaks compatibility with some of the meta injections vue-meta offers, e.g.:
{{{ meta.inject().htmlAttrs.text() }}} and {{{ meta.inject().bodyAttrs.text() }}}.

When using those in the index.html template, the build step minifies and lowercases it, resulting in
{{{ meta.inject().htmlattrs.text() }}} and {{{ meta.inject().bodyattrs.text() }}}.

As a result the server-side rendering process throws an error (500) because it cannot resolve htmlattrs/bodyattrs.

Solution

a) Enable case sensitivity for the minification step on the html webpack plugin.
b) Make the options configurable via plugin config.

Pull request for a) follows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions