-
Notifications
You must be signed in to change notification settings - Fork 0
/
modern.config.ts
40 lines (39 loc) · 944 Bytes
/
modern.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
import { appTools, defineConfig } from '@modern-js/app-tools';
import { bffPlugin } from '@modern-js/plugin-bff';
import { koaPlugin } from '@modern-js/plugin-koa';
import { polyfillPlugin } from '@modern-js/plugin-polyfill';
import { tailwindcssPlugin } from '@modern-js/plugin-tailwindcss';
import { SemiRspackPlugin } from '@douyinfe/semi-rspack-plugin';
// https://modernjs.dev/en/configure/app/usage
export default defineConfig({
bff: {
enableHandleWeb: process.env.NODE_ENV === 'production',
},
server: {
port: 8888,
},
runtime: {
router: true,
},
plugins: [
appTools({
bundler: 'experimental-rspack',
}),
bffPlugin(),
koaPlugin(),
polyfillPlugin(),
tailwindcssPlugin(),
],
html: {
title: 'Hackerese',
},
tools: {
rspack(config, context) {
context.appendPlugins([
new SemiRspackPlugin({
cssLayer: true,
}),
]);
},
},
});