Ant-design-pro: 项目Build之后, 登录界面背景图片无法显示

Created on 7 Dec 2018  ·  5Comments  ·  Source: ant-design/ant-design-pro

antd-pro项目 clone下来之后, 运行 yarn build ,部署后访问登录界面, 无法正常显示登录背景图片
无论是传网络资源图片或本地资源图片都不行
请问一下 这个该如何解决, 谢谢.

src/layouts/UserLayout.less

@media (min-width: @screen-md-min) {
    .container {
        background-image: url('../assets/bg.jpg');
        background-repeat: no-repeat;
        background-position: center 0;
        //background-size: 100%;
    }

    .content {
        padding: 72px 0 24px 0;
    }
}

Most helpful comment

plugin.config.js 删掉如何?

All 5 comments

看看编译浏览器里的css?

@chenshuai2144 看过了, yarn start 后有资源, yarn build后 找不到资源

plugin.config.js 删掉如何?

暂时把 config/config.js 里的 // import webpackPlugin from './plugin.config'; 停用就可以了,

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wuyongdec picture wuyongdec  ·  3Comments

renyi818 picture renyi818  ·  3Comments

yadongxie150 picture yadongxie150  ·  3Comments

952425340 picture 952425340  ·  3Comments

2uncle-code picture 2uncle-code  ·  3Comments