Skip to content

Commit

Permalink
feat(svgr-loader): include Babel transformation
Browse files Browse the repository at this point in the history
Closes #45
  • Loading branch information
gregberge committed Jan 31, 2018
1 parent 56a111f commit c0810f6
Show file tree
Hide file tree
Showing 13 changed files with 746 additions and 879 deletions.
15 changes: 9 additions & 6 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"presets": [
["env", {
"targets": {
"node": "6"
[
"@babel/preset-env",
{
"targets": {
"node": "6"
}
}
}]
]
],
"plugins": [
"transform-class-properties",
"transform-object-rest-spread"
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread"
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ In your `webpack.config.js`:
```js
{
test: /\.svg$/,
use: ['babel-loader', 'svgr/webpack'],
use: ['svgr/webpack'],
}
```

Expand Down
1 change: 0 additions & 1 deletion examples/webpack/.babelrc

This file was deleted.

1 change: 0 additions & 1 deletion examples/webpack/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions examples/webpack/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"name": "svgr-webpack-example",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"url-loader": "^0.6.2",
"webpack": "^3.10.0"
}
Expand Down
12 changes: 2 additions & 10 deletions examples/webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,11 @@ module.exports = {
rules: [
{
test: /url\.svg$/,
use: [
'babel-loader',
require.resolve('../../lib/webpack'),
'url-loader',
],
use: [require.resolve('../../webpack'), 'url-loader'],
},
{
test: /simple\.svg$/,
use: ['babel-loader', require.resolve('../../lib/webpack')],
},
{
test: /\.js$/,
use: ['babel-loader'],
use: [require.resolve('../../webpack')],
},
],
},
Expand Down
Loading

0 comments on commit c0810f6

Please sign in to comment.