We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
刚下下的的demo 想试一下SSR 结果一直都不能用 // https://umijs.org/config/ import { defineConfig } from 'umi'; import { join } from 'path';
import defaultSettings from './defaultSettings'; import proxy from './proxy'; import routes from './routes';
const { REACT_APP_ENV } = process.env;
export default defineConfig({ hash: true, antd: {}, dva: { hmr: true, }, layout: { // https://umijs.org/zh-CN/plugins/plugin-layout locale: true, siderWidth: 208, ...defaultSettings, }, // https://umijs.org/zh-CN/plugins/plugin-locale dynamicImport: { loading: '@ant-design/pro-layout/es/PageLoading', }, targets: { ie: 11, }, // umi routes: https://umijs.org/docs/routing routes, access: {}, // Theme for antd: https://ant.design/docs/react/customize-theme-cn theme: { // 如果不想要 configProvide 动态设置主题需要把这个设置为 default // 只有设置为 variable, 才能使用 configProvide 动态设置主色调 // https://ant.design/docs/react/customize-theme-variable-cn 'root-entry-name': 'default', }, chainWebpack(memo, args) { memo.plugins.delete('plugin-locale'); }, // esbuild is father build tools // https://umijs.org/plugins/plugin-esbuild esbuild: {}, title: false, ignoreMomentLocale: true, proxy: proxy[REACT_APP_ENV || 'dev'], manifest: { basePath: '/', }, // Fast Refresh 热更新 fastRefresh: {}, nodeModulesTransform: { type: 'none' }, mfsu: {}, webpack5: {}, ssr: { devServerRender: false, }, exportStatic: {}, }); 我把这个ssr 打开后, 开发环境运行页面打不开,一起报错 build生成不了 umi.server 必须得把 exportStatic 去除了才可以, 去除后可以生成 umi.server了但是生成的文件 在node上又运行不了。。。 现在有个项目已经开发了几个月了。现在有需要要支持SSR,应该如果处理呢
The text was updated successfully, but these errors were encountered:
No branches or pull requests
🥰 需求描述 | Requirements description
刚下下的的demo
想试一下SSR 结果一直都不能用
// https://umijs.org/config/
import { defineConfig } from 'umi';
import { join } from 'path';
import defaultSettings from './defaultSettings';
import proxy from './proxy';
import routes from './routes';
const { REACT_APP_ENV } = process.env;
export default defineConfig({
hash: true,
antd: {},
dva: {
hmr: true,
},
layout: {
// https://umijs.org/zh-CN/plugins/plugin-layout
locale: true,
siderWidth: 208,
...defaultSettings,
},
// https://umijs.org/zh-CN/plugins/plugin-locale
dynamicImport: {
loading: '@ant-design/pro-layout/es/PageLoading',
},
targets: {
ie: 11,
},
// umi routes: https://umijs.org/docs/routing
routes,
access: {},
// Theme for antd: https://ant.design/docs/react/customize-theme-cn
theme: {
// 如果不想要 configProvide 动态设置主题需要把这个设置为 default
// 只有设置为 variable, 才能使用 configProvide 动态设置主色调
// https://ant.design/docs/react/customize-theme-variable-cn
'root-entry-name': 'default',
},
chainWebpack(memo, args) {
memo.plugins.delete('plugin-locale');
},
// esbuild is father build tools
// https://umijs.org/plugins/plugin-esbuild
esbuild: {},
title: false,
ignoreMomentLocale: true,
proxy: proxy[REACT_APP_ENV || 'dev'],
manifest: {
basePath: '/',
},
// Fast Refresh 热更新
fastRefresh: {},
nodeModulesTransform: { type: 'none' },
mfsu: {},
webpack5: {},
ssr: {
devServerRender: false,
},
exportStatic: {},
});
我把这个ssr 打开后, 开发环境运行页面打不开,一起报错
build生成不了 umi.server 必须得把 exportStatic 去除了才可以,
去除后可以生成 umi.server了但是生成的文件 在node上又运行不了。。。
现在有个项目已经开发了几个月了。现在有需要要支持SSR,应该如果处理呢
The text was updated successfully, but these errors were encountered: