Skip to content

css image 'absolute' urls cannot be loaded #463

Closed
@stuku

Description

@stuku

I aim to build static web app for embedded devices. I try to arrage my webpack.config files in order to reach this goal after following all steps in accordance with official websites.

I've searched for recent discussions for solutions and none of them could fix my problem. By reference of #179, I tried to use relative path as well but it didn't work at all.

Here's what I've changed my /config/index.js build, while others remain default:

   index: path.resolve(__dirname, '../dist/index.html'),
   assetsRoot: path.resolve(__dirname, '../dist'),
   assetsSubDirectory: './static',
   assetsPublicPath: './',

Here's the 'css' code I try to make it work after "build":

.home-header {
  height: 111px;
  background: url(/static/img/home/home_logo.png) no-repeat 55px 30px;
}

Hope I've explained my questions clearly. Thank you for your attention and welcome to any suggestions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions