-
Notifications
You must be signed in to change notification settings - Fork 1
/
config-overrides.js
40 lines (36 loc) · 1.05 KB
/
config-overrides.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const path = require('path');
module.exports = function override(config, env) {
// add module aliases
config.resolve.alias['redux-state-branch'] = path.resolve(
'./src/redux-state-branch'
);
// grab the "oneOf" rule
const rules = config.module.rules[2].oneOf;
// add a markdown loader
rules.unshift(
/**
* This loader allows you to render inline code blocks
*/
{
test: /\.md$/,
include: path.resolve('./src'),
use: [
{
loader: require.resolve('babel-loader'),
options: {
// @remove-on-eject-begin
babelrc: false,
presets: [require.resolve('babel-preset-react-app')],
// @remove-on-eject-end
// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables caching results in ./node_modules/.cache/babel-loader/
// directory for faster rebuilds.
cacheDirectory: true
}
},
require.resolve('react-markdown-loader')
]
}
);
return config;
};