-
-
Notifications
You must be signed in to change notification settings - Fork 891
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
[breaking] Make file-loader
a peerDependency
#970
Conversation
See #911 (comment) |
package.json
Outdated
"make-cancellable-promise": "^1.0.0", | ||
"make-event-props": "^1.1.0", | ||
"merge-class-names": "^1.1.1", | ||
"merge-refs": "^1.0.0", | ||
"pdfjs-dist": "2.12.313", | ||
"prop-types": "^15.6.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is a normal dependency though. It gets imported in virtually all components. If it's missing, the project won't build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right but it's a compiletime dependency (devDependency) the final build includes no information about prop-types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That depends. The code built on my side does include propTypes, so if you use it in your project, prop-types package will be required.
It's up to developer's bundler configuration wherever propTypes are being removed or not.
Even if we decide to strip it off on our side, which doesn't make a lot of sense to me, then we would need to ship development and production versions of the code, and still, development version would require prop-types.
So, dependency must stay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed it back.
Marked file-loader as peer now. |
file-loader
a peerDependency
This looks good to me. We will have to wait for the next breaking version though, as this requires user to install file-loader manually to use Webpack-specific entry. |
be758b5
to
1a9897f
Compare
yeap so there is a major problem for the users using
It requires webpack installation, but I do not use or need webpack. I don't feel this PR will resolve this issue, because I'll have to install |
The second commit of this PR marks the peer as optional, so neither NPM nor yarn will install it without you to add it to your own package.json. |
Co-authored-by: Wojciech Maj <kontakt@wojtekmaj.pl>
Co-Authored-By: Wojciech Maj <kontakt@wojtekmaj.pl>
Define devDependency as devDependencies.
Otherwise users of this package hast to use the same webpack version. Currently ther are some copatibility issues with
create-rect-app
projects and thefile-loader
version in this project.