-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy path.umirc.ts
More file actions
48 lines (45 loc) · 1.12 KB
/
.umirc.ts
File metadata and controls
48 lines (45 loc) · 1.12 KB
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
// https://umijs.org/config/
import path, { resolve } from 'path'
import { defineConfig } from 'umi'
const isDev = process.env.NODE_ENV === 'development'
const publicPath = isDev ? '/' : '/umi3/'
export default defineConfig({
hash: true,
publicPath,
routes: [
{
path: publicPath,
component: 'index.tsx',
},
],
ignoreMomentLocale: true,
targets: {
chrome: 80,
},
extraBabelPlugins: [
[
// https://github.com/emotion-js/emotion/tree/main/packages/babel-plugin#options
require.resolve('@emotion/babel-plugin'),
{
sourceMap: true,
autoLabel: 'always',
labelFormat: '[local]',
},
],
],
extraBabelIncludes: [
// for support `?.` (optional-chaining) and `??` (nullish-coalescing-operator) in umi3 webpack4
'react-dev-inspector',
path.join(__dirname, '../../packages/'),
],
alias: {
// for support package.json `exports` field in umi3 webpack4
'@kobalte/core': '@kobalte/core/dist',
},
plugins: [
/**
* react-dev-inspector example configuration is as follows
*/
'@react-dev-inspector/umi3-plugin',
],
})