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

feat: support url-loader & file-loader #32

Merged
merged 1 commit into from
Jan 8, 2018
Merged

Conversation

gregberge
Copy link
Owner

@gregberge gregberge commented Jan 8, 2018

Following facebook/create-react-app#1388 (comment)

When you use url-loader + svgr/webpack or file-loader + svgr/webpack:

import { ReactComponent }, url from './file.svg'

When you use only svgr/webpack:

import ReactComponent from './file.svg'

Copy link

@iansu iansu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will work for the create-react-app use case. Thanks!

You can now use `url-loader` and `file-loader` with `svgr/webpack`.

For context, please refer to facebook/create-react-app#1388 (comment)
@gregberge gregberge force-pushed the improve-webpack-loader branch from d335ba8 to b95ed07 Compare January 8, 2018 23:16
@codecov
Copy link

codecov bot commented Jan 8, 2018

Codecov Report

Merging #32 into master will increase coverage by 0.46%.
The diff coverage is 42.1%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #32      +/-   ##
==========================================
+ Coverage    39.8%   40.27%   +0.46%     
==========================================
  Files          22       22              
  Lines         206      221      +15     
  Branches       49       52       +3     
==========================================
+ Hits           82       89       +7     
- Misses         96      102       +6     
- Partials       28       30       +2
Impacted Files Coverage Δ
src/index.js 100% <ø> (ø) ⬆️
src/webpack.js 0% <0%> (ø) ⬆️
src/transforms/wrapIntoComponent.js 80% <100%> (+17.5%) ⬆️

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 9c4789d...b95ed07. Read the comment docs.

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.

2 participants