-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodern.config.mjs
More file actions
45 lines (44 loc) · 952 Bytes
/
Copy pathmodern.config.mjs
File metadata and controls
45 lines (44 loc) · 952 Bytes
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
import { appTools, defineConfig } from '@modern-js/app-tools';
import { i18nPlugin } from '@modern-js/plugin-i18n';
export default defineConfig({
plugins: [
appTools(),
i18nPlugin({
localeDetection: {
languages: ['zh', 'en'],
fallbackLanguage: 'zh',
detection: {
order: ['localStorage', 'navigator'],
caches: ['localStorage'],
lookupLocalStorage: 'greenPedestrianLanguage',
},
},
htmlLangAttr: true,
}),
],
output: {
assetPrefix: process.env.ASSET_PREFIX || '/',
},
source: {
define: {
'process.env.IS_REACT18': JSON.stringify('true'),
},
entries: {
index: {
entry: './src/main.jsx',
disableMount: true,
},
},
disableDefaultEntries: true,
mainEntryName: 'index',
},
html: {
template: './index.html',
},
dev: {
host: '127.0.0.1',
},
server: {
port: 3001,
},
});