forked from kubeshop/monokle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcraco.config.js
40 lines (39 loc) · 1018 Bytes
/
craco.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
const CracoAlias = require('craco-alias');
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const CracoLessPlugin = require('craco-less');
const {getThemeVariables} = require('antd/dist/theme');
module.exports = {
webpack: {
plugins: {add: [new MonacoWebpackPlugin({languages: ['yaml'], globalAPI: true})]},
configure: webpackConfig => {
webpackConfig.node.__dirname = false;
webpackConfig.target = 'electron-renderer';
return webpackConfig;
},
},
plugins: [
{
plugin: CracoAlias,
options: {
source: 'tsconfig',
baseUrl: './',
tsConfigPath: './paths.json',
unsafeAllowModulesOutsideOfSrc: false,
debug: false,
},
},
{
plugin: CracoLessPlugin,
options: {
lessLoaderOptions: {
lessOptions: {
modifyVars: getThemeVariables({
dark: true,
}),
javascriptEnabled: true,
},
},
},
},
],
};