-
Notifications
You must be signed in to change notification settings - Fork 50
/
zarm.config.js
49 lines (45 loc) · 1.13 KB
/
zarm.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
const path = require('path');
const { name, version } = require('./package.json');
module.exports = {
entries: {
index: {
entry: ['./site/index.js'],
template: './site/index.html',
favicon: './site/favicon.ico',
},
index_umd: {
template: './site/index_umd.html',
inject: false,
},
},
resolve: {
alias: {
'zarm-web': path.join(process.cwd(), 'components'),
'@': path.join(process.cwd(), '/'),
'@site': path.join(process.cwd(), 'site'),
},
},
banner: `
${name} v${version}
Github: https://github.com/ZhonganTechENG/${name}
Copyright (c) 2013-present, ZhonganTech, Inc.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
`,
setBabelOptions: (options) => {
options.plugins.push([
'prismjs',
{
languages: ['javascript', 'typescript', 'jsx', 'tsx', 'css', 'scss', 'markup', 'bash'],
theme: 'default',
css: true,
},
]);
},
setRules: (rules) => {
rules.push({
test: /\.md$/,
use: ['raw-loader'],
});
},
};