html.tagsByEntries

  • Type: Record<string, ArrayOrNot<HtmlInjectTag | HtmlInjectTagHandler>>
  • Default: undefined

Used for multiple entry applications, injecting different tags for each entry.

The usage is the same as tags, and you can use the "entry name" as the key to set each page individually.

tagsByEntries will override the value set in tags.

WARNING

Deprecated: This configuration is deprecated, please use the function usage of html.tags instead.

Example

export default {
  html: {
    tags: [{ tag: 'script', attrs: { src: 'a.js' } }],
    tagsByEntries: {
      foo: [{ tag: 'script', attrs: { src: 'b.js' } }],
    },
  },
};

Compile the application and you can see a tag injected on the foo page:

<script src="b.js"></script>

And for any other pages:

<script src="a.js"></script>
ON THIS PAGE