Skip to content

[rollup-plugin-html] extractAssets from custom tagName #1558

@gdbaldw

Description

@gdbaldw

Currently, extractAssets = boolean. But, sometimes we'd like to extract more assets, as has been identified at modernweb-dev/rocket#162 and at #1008

So, I wrote a pull request #1541 such that extractAssets = boolean | tagAndAttribute[]

Example Usage

const html = require('../../dist/index').default;

module.exports = {
  input: 'demo/spa/index.html',
  output: {
    dir: './demo/dist',
  },
  plugins: [html({
    absoluteBaseUrl: 'http://localhost:8000',
    extractAssets: [
      {tagName: 'my-first-el', attribute: 'my-src'},
      {tagName: 'my-second-el', attribute: 'my-src'},
    ]
  })],
};

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