Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jun 5, 2020

Conversation

seivan
Copy link
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