generated from betfinio/template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrsbuild.config.ts
88 lines (86 loc) · 2.5 KB
/
rsbuild.config.ts
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';
import { defineConfig } from '@rsbuild/core';
import { pluginReact } from '@rsbuild/plugin-react';
import { dependencies } from './package.json';
const PORT = 9999;
export default defineConfig({
server: {
port: PORT,
},
dev: {
assetPrefix: `http://localhost:${PORT}`,
},
output: {
assetPrefix: process.env.PUBLIC_OUTPUT_URL,
},
tools: {
rspack: {
ignoreWarnings: [/Critical dependency: the request of a dependency is an expression/],
},
},
plugins: [
pluginReact(),
pluginModuleFederation({
name: 'betfinio_context',
exposes: {
'./config': './src/config/index',
'./style': './src/style',
'./translations': './src/translations/index',
'./lib/utils': './src/lib/utils',
'./lib/helpers': './src/lib/helpers',
'./lib/types': './src/lib/types/index',
'./lib/context': './src/lib/context/index',
'./lib/gql': './src/lib/gql/index',
'./lib/api': './src/lib/api/index',
'./lib/query': './src/lib/query/index',
'./lib/query/conservative': './src/lib/query/conservative',
'./lib/query/dynamic': './src/lib/query/dynamic',
'./lib/api/conservative': './src/lib/api/conservative',
'./lib/api/dynamic': './src/lib/api/dynamic',
'./globals': './src/globals',
'./components/SimpleConnectButton': './src/components/SimpleConnectButton',
'./components/MockRoot': './src/components/MockRoot',
'./components/CreateLinkModal': './src/components/CreateLinkModal',
'./components/MemberProfile': './src/components/MemberProfile',
},
shared: {
react: {
singleton: true,
requiredVersion: dependencies.react,
},
'react-dom': {
singleton: true,
requiredVersion: dependencies['react-dom'],
},
'@tanstack/react-query': {
singleton: true,
requiredVersion: dependencies['@tanstack/react-query'],
},
'react-i18next': {
singleton: true,
requiredVersion: dependencies['react-i18next'],
},
i18next: {
singleton: true,
requiredVersion: dependencies.i18next,
},
wagmi: {
singleton: true,
requiredVersion: dependencies.wagmi,
},
'@privy-io/react-auth': {
singleton: true,
requiredVersion: dependencies['@privy-io/react-auth'],
},
'@privy-io/wagmi': {
singleton: true,
requiredVersion: dependencies['@privy-io/wagmi'],
},
'@betfinio/components': {
singleton: true,
requiredVersion: dependencies['@betfinio/components'],
},
},
}),
],
});