-
Notifications
You must be signed in to change notification settings - Fork 0
/
doczrc.js
47 lines (44 loc) · 1.52 KB
/
doczrc.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
41
42
43
44
45
46
47
import merge from 'webpack-merge'
export default {
title: 'Codebrahma Website Components',
wrapper: 'docs/config/wrapper.js',
indexHtml: 'docs/index.html',
themeConfig: {
showPlaygroundEditor: true
},
modifyBundlerConfig: config => {
const gatsbyNecessaryConfig = {
module: {
rules: [
{
// Transpile Gatsby module because Gatsby includes un-transpiled ES6 code.
// Ignore .json files because they fail to be parsed
exclude: [/node_modules\/(?!(gatsby(.*))\/)/, /\.json$/],
use: [
{
// use installed babel-loader which is v8.0-beta (which is meant to work with @babel/core@7)
loader: 'babel-loader',
options: {
// use @babel/preset-react for JSX and env (instead of staged presets)
presets: ['@babel/preset-react', '@babel/preset-env'],
plugins: [
// use @babel/plugin-proposal-class-properties for class arrow functions
'@babel/plugin-proposal-class-properties',
// use @babel/plugin-syntax-dynamic-import for dynamic import support
'@babel/plugin-syntax-dynamic-import',
],
},
},
],
},
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
],
},
}
return merge(gatsbyNecessaryConfig, config)
},
files: './docs/*.mdx'
}