Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

fix: peer deps #189

Closed
wants to merge 1 commit into from
Closed

fix: peer deps #189

wants to merge 1 commit into from

Conversation

alexander-akait
Copy link
Member

@alexander-akait alexander-akait commented Aug 30, 2019

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

fix peer deps

Breaking Changes

No

Additional Info

/cc @arcanis

need your advice in this situation, by default we use file-loader if we can't decode content to base64 (limit option), but we allow to setup custom fallback (https://github.com/webpack-contrib/url-loader#fallback, allow to use any other loader), so we can't setup right peer deps in this case. What we should do?

@codecov
Copy link

codecov bot commented Aug 30, 2019

Codecov Report

Merging #189 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #189   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines          38     38           
  Branches       10     10           
=====================================
  Hits           38     38

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b9dbd1...21f627a. Read the comment docs.

@arcanis
Copy link

arcanis commented Aug 30, 2019

What we should do?

I would recommend to slightly change the documentation to recommend your users to use require.resolve. This will ensure that the resolution is done from whichever file declares the fallback rather than from the point of view of url-loader:

module.exports = {
  module: {
    rules: [
      {
        test: /\.(png|jpg|gif)$/i,
        use: [
          {
            loader: 'url-loader',
            options: {
              fallback: require.resolve('responsive-loader'),
            },
          },
        ],
      },
    ],
  },
};

@alexander-akait
Copy link
Member Author

@arcanis thanks for reply

@alexander-akait
Copy link
Member Author

Docs updated, new PR for support pnp #195

@alexander-akait alexander-akait deleted the fix-peer-deps branch November 26, 2019 11:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants