-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcraco.config.js
44 lines (43 loc) · 1.16 KB
/
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
41
42
43
44
// craco.config.js
const path = require('path')
const resolve = (dir) => path.resolve(__dirname, dir)
const CracoLessPlugin = require('craco-less')
module.exports = {
webpack: {
configure: (webpackConfig, { env, paths }) => {
paths.appBuild = 'mining';
webpackConfig.output = {
...webpackConfig.output,
path: path.resolve(__dirname, 'mining'),
publicPath: '/'
}
return webpackConfig;
},
alias: {
'@': resolve('src'),
'views': resolve('src/views'),
'constants': resolve('src/constants'),
'hooks': resolve('src/hooks'),
'connection': resolve('src/connection'),
'connectors': resolve('src/assets/connectors'),
'components': resolve('src/components'),
'images': resolve('src/assets/images')
}
},
plugins: [
{
plugin: CracoLessPlugin,
options: {
lessLoaderOptions: {
lessOptions: {
modifyVars: {
'@desktop': "~'only screen and (min-width: 760px)'",
'@mobile': "~'only screen and (max-width: 760px)'",
},
javascriptEnabled: true
}
}
}
},
],
}