This repository has been archived by the owner on Jun 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
styleguide.config.js
59 lines (57 loc) · 1.71 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const config = require("./webpack.config");
// remove babel-loader rule and replace it with one that includes
// the regeneratorRuntime
config.module.rules = config.module.rules.filter(rule => String(rule.test) !== String(/\.js$/));
config.module.rules.push({
test: /\.js$/,
exclude: /node_modules\/(?!ripe-sdk)/,
use: [
{
loader: "babel-loader",
options: {
presets: [
process.env.NODE_ENV === "development"
? [
"@babel/preset-env",
{
targets: {
browsers: ["last 2 years"]
},
useBuiltIns: "entry",
corejs: "3"
}
]
: "@babel/preset-env"
],
plugins: [
[
"@babel/plugin-transform-runtime",
{
regenerator: true
}
]
]
}
}
]
});
module.exports = {
styleguideDir: "dist/styleguide",
webpackConfig: Object.assign({}, config, {
externals: {}
}),
sections: [
{
name: "Introduction",
content: "./README.md"
},
{
name: "Components",
components: "vue/components/**/*.vue"
},
{
name: "Storybook",
href: "/storybook"
}
]
};