forked from contentful/field-editors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoczrc.js
69 lines (68 loc) · 1.61 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import tokens from '@contentful/f36-tokens';
export default {
title: 'Contentful Field Editors',
description: 'React components and apps for building Contentful entry editor',
src: './packages/',
files: '**/*.mdx',
typescript: true,
port: 9000,
codeSandbox: false,
themeConfig: {
colors: {
primary: tokens.blue600,
secondary: tokens.blue100,
gray: tokens.gray300,
link: tokens.blue600,
blue: tokens.blue600,
text: tokens.gray800,
},
styles: {
body: {
fontFamily: tokens.fontStackPrimary,
fontSize: '14px',
lineHeight: tokens.lineHeightDefault,
},
code: {
margin: '0 3px',
padding: '4px 6px',
borderRadius: '3px',
fontFamily: tokens.fontStackMonospace,
fontSize: '0.85em',
},
pre: {
fontFamily: tokens.fontStackMonospace,
fontSize: 14,
lineHeight: 1.8,
},
},
},
menu: ['Introduction', 'Editors', 'Shared'],
wrapper: 'docz.wrapper.jsx',
modifyBabelRc: (babelrc) => {
const newBabelRc = {
...babelrc,
plugins: [
...babelrc.plugins,
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-nullish-coalescing-operator',
],
};
return newBabelRc;
},
modifyBundlerConfig: (webpackConfig) => {
const config = {
...webpackConfig,
module: {
...webpackConfig.module,
rules: [
...webpackConfig.module.rules,
{
test: /\.mjs$/,
type: 'javascript/auto',
},
],
},
};
return config;
},
};