Vue CLI build and run index.html file without server

后端 未结 3 1245
Happy的楠姐
Happy的楠姐 2021-02-05 10:45

I\'m using the latest vue-cli version 3.0.

My current issue is that whenever I run npm run build the files generated in the dist f

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-05 10:49

    I was able to fix this issue by manually changing the url of the referenced files.

    It's a bit of a pain, but this was a solution without having to mess around with the build configuration.

    What you need to do:

    1. Open index.html
    2. Find href=/ and replace with href=
    3. Find src=/ and replace with src=

    NOTE: I was in need of this solution because I was creating a Phonegap app.

提交回复
热议问题