-
Notifications
You must be signed in to change notification settings - Fork 10
/
styleguide.config.js
38 lines (36 loc) · 998 Bytes
/
styleguide.config.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
const path = require('path');
const webpack = require('webpack');
module.exports = {
title: 'Urbica React Map GL Draw',
moduleAliases: {
'@urbica/react-map-gl-draw': path.resolve(__dirname, 'src')
},
require: [path.resolve(__dirname, 'styleguide.setup.js')],
sections: [
{
name: 'Examples',
components: () => [
'docs/basic-usage.md',
'docs/set-initial-features.md',
'docs/change-mode.md',
'docs/change-control-position.md'
],
exampleMode: 'expand'
},
{
name: 'Props',
components: 'src/components/**/index.js',
usageMode: 'expand'
}
],
dangerouslyUpdateWebpackConfig: (webpackConfig) => {
const envPlugin = new webpack.EnvironmentPlugin(['MAPBOX_ACCESS_TOKEN']);
webpackConfig.plugins.push(envPlugin);
// eslint-disable-next-line
webpackConfig.output = {
...webpackConfig.output,
publicPath: process.env.PUBLIC_URL || ''
};
return webpackConfig;
}
};