-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9d5074
commit 4a84787
Showing
3 changed files
with
463 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,47 @@ | ||
require('dotenv').config(); | ||
|
||
const config = { | ||
env: { | ||
GITHUB_TOKEN: process.env.GITHUB_TOKEN, | ||
const babelLoader = { | ||
loader: 'babel-loader', | ||
}; | ||
|
||
const svgrLoader = { | ||
loader: '@svgr/webpack', | ||
options: { | ||
babel: false, | ||
svgoConfig: { | ||
plugins: { | ||
removeViewBox: false, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
const urlLoader = { | ||
loader: 'url-loader', | ||
options: { | ||
limit: 1024, | ||
}, | ||
}; | ||
|
||
const env = { | ||
GITHUB_TOKEN: process.env.GITHUB_TOKEN, | ||
}; | ||
|
||
const webpack = config => { | ||
config.module.rules.unshift({ | ||
test: /\.svg$/, | ||
issuer: { | ||
test: /\.js$/, | ||
}, | ||
use: [babelLoader, svgrLoader, urlLoader], | ||
}); | ||
|
||
return config; | ||
}; | ||
|
||
const config = { | ||
env, | ||
webpack, | ||
}; | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.