Skip to content

fix(url): Conform to Rollup type definitions.#433

Merged
shellscape merged 2 commits intorollup:masterfrom
seivan:patch-1
Jun 5, 2020
Merged

fix(url): Conform to Rollup type definitions.#433
shellscape merged 2 commits intorollup:masterfrom
seivan:patch-1

Conversation

@seivan
Copy link
Copy Markdown
Contributor

@seivan seivan commented Jun 3, 2020

Rollup Plugin Name: url

This PR contains:

  • bugfix
  • other

Are tests included?

  • yes

Breaking Changes?

  • no

Description

Conform to Rollup type definitions to silence compiler errors, as they expect a plugin name and it's expected/advised on the docs.

Current workaround is:

        {
            name: "url",
            ...url({
                limit: 0,
                include: defaultAssetTypes,
                fileName: '[dirname][name]_[hash][extname]',
                sourceDir: path.join(__dirname, 'src')
            })
        },

or more succinct and error prone:

        url({
            limit: 0,
            include: defaultAssetTypes,
            fileName: '[dirname][name]_[hash][extname]',
            sourceDir: path.join(__dirname, 'src')
        }) as any,

Also, exporting defaultInclude as I'd like to extend the defaults instead of redefining them.
Edit: Got rid of that, since I guess you don't want to mix default and named export, understandable.

Also, exporting `defaultInclude` as I'd like to extend the defaults instead of redefining them.
@seivan seivan changed the title Conform to Rollup type definitions. fix(url): Conform to Rollup type definitions. Jun 3, 2020
@shellscape shellscape merged commit d970c31 into rollup:master Jun 5, 2020
@seivan seivan deleted the patch-1 branch June 5, 2020 20:09
LarsDenBakker pushed a commit to LarsDenBakker/plugins that referenced this pull request Sep 12, 2020
* Conform to Rollup type definitions. 

Also, exporting `defaultInclude` as I'd like to extend the defaults instead of redefining them.

* Update index.js
franklx pushed a commit to franklx/rollup-plugin-url-emit that referenced this pull request Sep 28, 2020
* Conform to Rollup type definitions. 

Also, exporting `defaultInclude` as I'd like to extend the defaults instead of redefining them.

* Update index.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants