File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 2
2
function rewireGraphQLTag ( config , env ) {
3
3
const gqlExtension = / \. ( g r a p h q l | g q l ) $ /
4
4
5
- const fileLoader = config . module . rules . find ( rule => rule . loader && rule . loader . indexOf ( "file-loader" ) !== - 1 ) ;
6
- fileLoader . exclude . push ( gqlExtension ) ;
5
+ const fileLoader = flatten ( config . module . rules . map ( ( rule ) => rule . oneOf || rule ) )
6
+ . find ( ( rule ) => rule . loader && rule . loader . indexOf ( "file-loader" ) !== - 1 ) ;
7
+
8
+ fileLoader && fileLoader . exclude . push ( gqlExtension ) ;
7
9
8
10
const gqlTagRule = {
9
11
test : gqlExtension ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-app-rewire-graphql-tag" ,
3
- "version" : " 1.0 .0" ,
3
+ "version" : " 1.1 .0" ,
4
4
"description" : " rewire your react-app and use graphql-tag" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments