Skip to content
New issue

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

[Bug] favicons: ['/favicon.ico'] 配置无效 #11138

Closed
keene-dalveytech opened this issue May 12, 2023 · 1 comment
Closed

[Bug] favicons: ['/favicon.ico'] 配置无效 #11138

keene-dalveytech opened this issue May 12, 2023 · 1 comment

Comments

@keene-dalveytech
Copy link

keene-dalveytech commented May 12, 2023

export default defineConfig({
publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
npmClient: 'npm',
plugins: ['@umijs/plugins/dist/locale', '@umijs/plugins/dist/model'],
history: { type: 'hash' },
favicons: ['/favicon.ico'],
routes: [
{
path: '/',
component: '@/components/App',
routes: [
...
],
},
{
path: '/analytices',
component: 'analytices',
},
],
locale: {
baseNavigator: false,
default: 'en-US',
},
model: {},
})

image image

Context

  • Umi Version: ^4.0.47
  • Node Version: 18
  • Platform: MacOS
@fz6m
Copy link
Contributor

fz6m commented May 12, 2023

配置 /favicon.ico 表示会从这个位置加载,但这个文件本身是不存在的,你需要把它放到 public 里才能访问到。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants