Skip to content

css img path error #366

Closed
Closed
@ShootToThrill

Description

@ShootToThrill

my site url like http://192.168.10.13:8000/dist/
so i can not push file in root path

after npm run build

all js css 404 error,like

http://192.168.10.13:8000/static/js/manifest.6c9993f93b3d01905b03.js Failed to load resource: the server responded with a status of 404 (Not Found)

in index.html is like
<script type=text/javascript src=/static/js/manifest.6c9993f93b3d01905b03.js></script>

if i change config/index.js assetsPublicPath:'/'=>assetsPublicPath:''

js and css no 404 error

but i use an img in .vue like .hello{ width: 200px; height: 200px; background: url(../assets/logo.png) 0 0 no-repeat; }

so the logo.png 404 because after build the css is like
url(static/img/logo.d19a753.png)

the error is like http://192.168.10.13:8000/dist/static/css/static/img/logo.d19a753.png Failed to load resource: the server responded with a status of 404 (Not Found)

so how i fix this ?

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