-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyleguide.config.js
72 lines (71 loc) · 1.68 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
60
61
62
63
64
65
66
67
68
69
70
71
72
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
const { join } = require('path')
const TsconfigPathsWebpackPlugin = require('tsconfig-paths-webpack-plugin')
const { DefinePlugin } = require('webpack')
const pkg = require('./package.json')
module.exports = {
title: 'Ultimate React Multilevel Menu',
version: pkg.version,
components: join(__dirname, 'src/lib/**/*.tsx'),
require: [
join(__dirname, 'styleguide/setup.js'),
join(__dirname, 'styleguide/styles.css')
],
assetsDir: join(__dirname, 'styleguide/assets'),
styleguideDir: join(__dirname, 'docs'),
template: {
favicon: 'favicon.ico',
head: {
links: [{ href: 'manifest', rel: 'manifest' }]
}
},
ribbon: {
text: 'View on GitHub',
url: pkg.homepage
},
webpackConfig: {
module: {
rules: [
{
test: /\.tsx?$/,
exclude: /node_modules/,
loader: 'ts-loader'
},
{
test: /\.less$/,
use: [
'style-loader',
'css-loader',
{
loader: 'less-loader',
options: {
lessOptions: {
javascriptEnabled: true
}
}
}
]
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
}
]
},
resolve: {
extensions: ['.css', '.less', '.js', '.json', '.ts', '.tsx'],
plugins: [new TsconfigPathsWebpackPlugin()]
},
plugins: [
new DefinePlugin({
process: { env: {} }
}),
new NodePolyfillPlugin()
],
devtool: 'source-map',
devServer: {
port: 6060,
hot: true
}
}
}