36821dd7
张志伟
feat: init
|
1
|
import { appTools, defineConfig } from '@modern-js/app-tools';
|
5d134410
张志伟
🐱 feat(*): init
|
2
|
import { tailwindcssPlugin } from '@modern-js/plugin-tailwindcss';
|
36821dd7
张志伟
feat: init
|
3
4
5
6
7
|
// https://modernjs.dev/en/configure/app/usage
export default defineConfig({
runtime: {
router: true,
|
5d134410
张志伟
🐱 feat(*): init
|
8
9
10
|
state: true,
},
dev: {
|
cc409037
张志伟
🚚 chore(*): 更新依赖
|
11
|
progressBar: { id: `🐹 ${process.env.APP_NAME}` },
|
5d134410
张志伟
🐱 feat(*): init
|
12
13
|
host: process.env.XHOST,
port: Number(process.env.XPORT ?? 8080),
|
36821dd7
张志伟
feat: init
|
14
15
16
17
18
|
},
plugins: [
appTools({
bundler: 'experimental-rspack',
}),
|
5d134410
张志伟
🐱 feat(*): init
|
19
|
tailwindcssPlugin(),
|
36821dd7
张志伟
feat: init
|
20
|
],
|
5d134410
张志伟
🐱 feat(*): init
|
21
22
23
24
25
26
27
28
29
30
|
performance: {
removeConsole: ['log', 'info', 'warn'],
},
source: {
globalVars: {
'process.env.MODERN_DOMAIN': process.env.MODERN_DOMAIN,
'process.env.MODERN_GRAY_TAG': process.env.MODERN_GRAY_TAG,
'process.env.MODERN_APP_ID': process.env.MODERN_APP_ID,
'process.env.MODERN_CALKEY': process.env.MODERN_CALKEY,
},
|
5d134410
张志伟
🐱 feat(*): init
|
31
32
|
},
tools: {
|
cc409037
张志伟
🚚 chore(*): 更新依赖
|
33
|
rspack: config => {
|
5d134410
张志伟
🐱 feat(*): init
|
34
35
36
37
38
|
config.experiments = {
...config.experiments,
asyncWebAssembly: true,
rspackFuture: {
...config.experiments?.rspackFuture,
|
5d134410
张志伟
🐱 feat(*): init
|
39
40
41
42
|
},
};
return config;
},
|
0694c397
张志伟
🐹 feat(*): 更新
|
43
|
sass: {
|
578db391
王强
fix(*): 适配脚手架
|
44
|
// 不能修改
|
0694c397
张志伟
🐹 feat(*): 更新
|
45
46
|
additionalData: '@import "@feewee/h5app-common/dist/es/styles/custom_theme.css";',
},
|
5d134410
张志伟
🐱 feat(*): init
|
47
48
49
50
51
52
53
54
55
56
57
58
59
|
devServer: {
proxy: {
'/api': {
target: process.env.API_HOST,
pathRewrite: { '^/api': '' },
},
'/api2': {
target: process.env.FILE_HOST,
pathRewrite: { '^/api2': '' },
},
},
},
},
|
36821dd7
张志伟
feat: init
|
60
|
});
|