12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- import { defineConfig } from 'umi';
- import defaultSettings from './defaultSettings';
- import proxy from './proxy';
- import { adMonitor, launchSystem, launchSystemV3 } from './routerConfig';
- const { REACT_APP_ENV } = process.env;
- export default defineConfig({
- headScripts: [
- { src: 'https://unpkg.com/mediainfo.js', type: "text/javascript" }
- ],
- metas: [
- { httpEquiv: 'Content-Security-Policy', content: "script-src 'self' *.alibaba-inc.com *.dingtalk.com *.alicdn.com *.alipay.com" }
- ],
- history: {
- type: 'hash',
- },
-
- hash: true,
- antd: {
-
-
- },
- dva: {
- hmr: true,
- },
- layout: {
- name: '趣程投放工具',
- locale: false,
- siderWidth: 208
- },
- locale: {
-
- default: 'zh-CN',
-
- antd: true,
- baseNavigator: true,
- },
- dynamicImport: {
-
- loading: '@/components/PageLoading/index',
- },
- targets: {
- ie: 11,
- },
-
- routes: [
- {
- path: '/user',
- layout: false,
- routes: [
- {
- name: 'login',
- path: '/user/login',
- component: './user/login',
- },
- ],
- },
-
-
- launchSystem,
- launchSystemV3,
- adMonitor,
-
- {
- path: '/',
- redirect: '/',
- },
- {
- component: './404',
- },
- ],
-
- theme: {
-
- 'primary-color': defaultSettings.primaryColor,
- },
-
- title: false,
- ignoreMomentLocale: true,
- proxy: proxy[(REACT_APP_ENV || 'dev') as keyof typeof proxy],
- manifest: {
- basePath: '/',
- },
- });
|