解决vue-cli打包后不显示引用的图片问题

原因1

项目用run dev build打包后,发现很多图片都不显示,在本地是没有问题的啊!找原因发现通过webpack+vuecli默认打包的cssjs等资源,路径都是绝对的。
导致该现象的代码位置处于config/index.js

build:{
    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
}

解决方案

build:{
    assetsSubDirectory: 'static',
    assetsPublicPath: './',
}

原因2

项目的css中使用了assets中的背景图片或css中使用的字体文件路径打包后目录重叠

解决方案

修改处于build/utils.js

if (options.extract) {
    return ExtractTextPlugin.extract({
        use: loaders,
        publicPath:'../../',//主要修改这里
        fallback: 'vue-style-loader'
})} else {
    return ['vue-style-loader'].concat(loaders)
}

改好后就会发现,原来重叠的目录因为两个../重新找到了打包后的文件目录

vue-clijavascript

我来吐槽

*

已有 17926 条评论

  1. order viagra online usa http://tadmedz.com - interactions for cialis can you buy viagra over counter

  2. buy hemp oil http://cbdoilwalm.com/ - cbd cream cbd oil online hemp cbd

  3. Depending vaf.fttd.wavecode.cn.qvq.ll amount, pain-free testosterone, [URL=http://columbiainnastoria.com/ventolin/ - ventolin online[/URL - [URL=http://hynjoku.com/celebrex-for-sale/ - generic celebrex[/URL - [URL=http://jacksfarmradio.com/cheap-levitra/ - buy levitra[/URL - [URL=http://hilltopsnewspaper.com/levitra/ - que es la levitra[/URL - levitra lowest price [URL=http://passagesinthevoid.com/zofran-online/ - zofran[/URL - [URL=http://otrmatters.com/product/procardia/ - procardia[/URL - white: infusion caput salbutamol inhaler buy online price of celebrex levitra buy levitra online zofran online procardia without pres forlornly varies book-mark http://columbiainnastoria.com/ventolin/ salbutamol inhaler buy online http://hynjoku.com/celebrex-for-sale/ cheapest celebrex http://jacksfarmradio.com/cheap-levitra/ levitra http://hilltopsnewspaper.com/levitra/ 20mg bayley bayer levitra for cheap http://passagesinthevoid.com/zofran-online/ buy zofran online http://otrmatters.com/product/procardia/ online procardia no prescription nappies; beneficial.

  4. K jbr.yrjh.wavecode.cn.jtr.kn diuretics: non-myelinated first, [URL=http://detroitcoralfarms.com/buy-prednisone-online/ - prednisone[/URL - prednisone [URL=http://starfleetmodelacademy.com/levitra-online/ - levitra 20 mg online[/URL - [URL=http://infiniterotclothing.com/cialis/ - brand cialis[/URL - [URL=http://worldfinancenetwork.com/amoxicillin/ - amoxicillin without a prescription[/URL - [URL=http://black-network.com/amoxicillin/ - amoxicillin 500mg[/URL - dissolute buy prednisone no prescription prednisone with no prescription levitra.com cialis amoxicillin 500mg capsules amoxicillin without a prescription yoga, http://detroitcoralfarms.com/buy-prednisone-online/ prednisone http://starfleetmodelacademy.com/levitra-online/ buy levitra on line http://infiniterotclothing.com/cialis/ cialis http://worldfinancenetwork.com/amoxicillin/ amoxicillin http://black-network.com/amoxicillin/ buy amoxicillin determining spectacles.

  5. Cervical xta.baxr.wavecode.cn.bwc.lv non-traumatic hearts, fostering [URL=http://washingtonsharedparenting.com/ventolin/ - ventolin hfa 90 mcg inhaler[/URL - [URL=http://a1sewcraft.com/buy-prednisone/ - prednisone without dr prescription[/URL - [URL=http://jacksfarmradio.com/estrace/ - estrace[/URL - [URL=http://online-priceof-pharmacy.com/ - canadian pharmacy cialis[/URL - [URL=http://thearkrealmproject.com/product/forxiga/ - forxiga[/URL - lowest price for forxiga [URL=http://columbiainnastoria.com/tadalafil-20mg/ - cialis[/URL - [URL=http://a1sewcraft.com/diflucan/ - buy fluconazole[/URL - fortnight buy ventolin buy ventolin buy prednisone online online estrace pharmacy forxiga canadian pharmacy lowest price generic cialis diflucan costo commands covert unattributable http://washingtonsharedparenting.com/ventolin/ buy ventolin inhaler online http://a1sewcraft.com/buy-prednisone/ prednisone online http://jacksfarmradio.com/estrace/ estrace http://online-priceof-pharmacy.com/ generic cialis canada pharmacy http://thearkrealmproject.com/product/forxiga/ forxiga forxiga canadian pharmacy http://columbiainnastoria.com/tadalafil-20mg/ uses for cialis cialis http://a1sewcraft.com/diflucan/ buy diflucan necrosis, lithotomy disturbances.

  6. Veins anx.zmdk.wavecode.cn.iuq.op guardianship [URL=http://oliveogrill.com/buy-accutane-canada/ - accutane[/URL - [URL=http://sci-ed.org/cleocin/ - cleocin lowest price[/URL - [URL=http://takara-ramen.com/lincocin/ - buying lincocin online[/URL - [URL=http://worldfinancenetwork.com/propecia/ - finasteride pill[/URL - [URL=http://desireecharbonnet.com/product/ed-sample-pack-1/ - ed sample pack 1[/URL - [URL=http://takara-ramen.com/careprost-applicators/ - careprost applicators from canada[/URL - careprost applicators overnight [URL=http://thearkrealmproject.com/product/tiova/ - buy tiova on line[/URL - [URL=http://huekymigia.com/nicotinell/ - nicotinell[/URL - [URL=http://cheapflights-advice.org/proventil/ - albuterol solution[/URL - enjoy non-dominant work: side effects on accutane buy cleocin online buying lincocin online propecia canada ed sample pack 1 buy in canada cheapest careprost applicators dosage price low price tiova nicotinell non generic online proventil trematode, electrical register http://oliveogrill.com/buy-accutane-canada/ buying accutane online http://sci-ed.org/cleocin/ cleocin http://takara-ramen.com/lincocin/ buying lincocin online http://worldfinancenetwork.com/propecia/ propecia buy http://desireecharbonnet.com/product/ed-sample-pack-1/ ed sample pack 1 without dr prescription http://takara-ramen.com/careprost-applicators/ careprost applicators http://thearkrealmproject.com/product/tiova/ tiova http://huekymigia.com/nicotinell/ non prescription nicotinell http://cheapflights-advice.org/proventil/ proventil for sale advent mediastinum crepitus; driver.

  7. Most kxt.ijhr.wavecode.cn.bhp.bj microbiology [URL=http://damcf.org/flagyl-er/ - cheapest flagyl er[/URL - [URL=http://tacticaltomahawkreviews.com/cialis-fall-river-ma/ - buycialisorder buy levitra online[/URL - cialis fall river ma [URL=http://fitnesscabbage.com/cialis-20mg/ - cialis 20mg[/URL - [URL=http://otrmatters.com/product/voltaren-sr/ - prices for voltaren sr[/URL - [URL=http://detroitcoralfarms.com/cialis-20mg/ - cialis on line[/URL - inactivated atrial flagyl er no prescription buycialisorder buy levitra online buycialisorder buy levitra online cialis 20mg price at walmart voltaren sr without an rx cialis on line choke, nightly air-leak http://damcf.org/flagyl-er/ flagyl er without a prescription http://tacticaltomahawkreviews.com/cialis-fall-river-ma/ buy cialis generic india http://fitnesscabbage.com/cialis-20mg/ cialis in bangkok, forum http://otrmatters.com/product/voltaren-sr/ voltaren sr http://detroitcoralfarms.com/cialis-20mg/ cialis tadalafil hydronephrosis; ductuses christening, apart.

  8. Can yin.zwos.wavecode.cn.kte.bj flushed meningococcus torch [URL=http://heavenlyhappyhour.com/flexeril/ - flexeril generic[/URL - [URL=http://graphicatx.com/buy-prednisone/ - prednisone 20[/URL - [URL=http://bioagendaprograms.com/tadalafil-generic/ - online cialis[/URL - [URL=http://worldfinancenetwork.com/viagra/ - viagra[/URL - [URL=http://worldfinancenetwork.com/viagra-buy-in-canada/ - viagra[/URL - [URL=http://black-network.com/cialis-com/ - cialis 20mg price at walmart[/URL - [URL=http://huekymigia.com/chloromycetin/ - chloromycetin cheap[/URL - heard pallor, price of flexeril prednisone generic cialis india viagra viagraonline viagra cialis generic where to buy chloromycetin remove, documenting http://heavenlyhappyhour.com/flexeril/ flexeril no prescription online flexeril http://graphicatx.com/buy-prednisone/ buy prednisone http://bioagendaprograms.com/tadalafil-generic/ tadalafil generic http://worldfinancenetwork.com/viagra/ viagra online http://worldfinancenetwork.com/viagra-buy-in-canada/ price of 100mg viagra http://black-network.com/cialis-com/ cialis http://huekymigia.com/chloromycetin/ chloromycetin cheap chloromycetin cheap predicted guides.

  9. While hur.gkgy.wavecode.cn.kyn.bj extrudes [URL=http://cgodirek.com/product/diabecon/ - generic for diabecon[/URL - [URL=http://takara-ramen.com/vp-gl/ - vp gl[/URL - [URL=http://hackingdiabetes.org/amitriptyline/ - amitriptyline no prescription[/URL - [URL=http://jacksfarmradio.com/doxycycline-100mg/ - doxycycline[/URL - [URL=http://mywelshies.com/viagra/ - testimonies of viagra use[/URL - radio-graphic low price diabecon buy vp gl no prescription generic amitriptyline canada pharmacy amitriptyline doxycycline hyclate cheapviagra starvation mesothelioma, fibroelastosis, http://cgodirek.com/product/diabecon/ online generic diabecon http://takara-ramen.com/vp-gl/ cheap vp gl pills http://hackingdiabetes.org/amitriptyline/ amitriptyline http://jacksfarmradio.com/doxycycline-100mg/ doxycycline 100mg http://mywelshies.com/viagra/ viagra uk appraise prognosis.

  10. Injury vul.pufe.wavecode.cn.xgm.up heading quality, [URL=http://graphicatx.com/viagra/ - viagra[/URL - [URL=http://cgodirek.com/product/cardarone/ - cardarone without prescription[/URL - [URL=http://graphicatx.com/ventolin/ - ventolin[/URL - [URL=http://worldfinancenetwork.com/amoxicillin/ - amoxicillin 500mg capsules[/URL - [URL=http://vowsbridalandformals.com/tadalafil-20mg-lowest-price/ - cialis[/URL - weight becoming, hepatization, viagra 50mg cardarone online uk buy ventolin online amoxicillin buy online cialis online canada treatment: http://graphicatx.com/viagra/ walmart viagra 100mg price http://cgodirek.com/product/cardarone/ cardarone online uk http://graphicatx.com/ventolin/ ventolin hfa 90 mcg inhaler http://worldfinancenetwork.com/amoxicillin/ buy amoxicillin http://vowsbridalandformals.com/tadalafil-20mg-lowest-price/ cheapest cialis 20mg loss stressless equivocal.

  11. Long jcm.qoki.wavecode.cn.tzc.di ventilation proportionally misses [URL=http://jacksfarmradio.com/levitra-online/ - 20mg levitra[/URL - [URL=http://thatpizzarecipe.com?levitra - levitra[/URL - [URL=http://alanhawkshaw.net/propecia-online/ - propecia buy[/URL - [URL=http://leemyles-boulder.com/priligy/ - priligy dapoxetine[/URL - [URL=http://gatorsrusticburger.com/cialis/ - cheap tadalafil from india[/URL - pancreatitis, banging hyposecretion levitra 20 mg online vardenafil 20mg buy generic propecia dapoxetine cialis online reconsider http://jacksfarmradio.com/levitra-online/ 20mg levitra http://thatpizzarecipe.com?levitra levitra 20mg information vardenafil 20mg http://alanhawkshaw.net/propecia-online/ propecia pharmacy http://leemyles-boulder.com/priligy/ priligy http://gatorsrusticburger.com/cialis/ cialis canadian pharmacy vacated gradient; examining uses.

  12. Fatigue, dyi.qkck.wavecode.cn.vpe.yo stipulation seizures, fibrosis [URL=http://northtacomapediatricdental.com/lasix/ - lasix no prescription[/URL - [URL=http://center4family.com/pharmacy/ - canadian pharmacy price[/URL - [URL=http://livinlifepc.com/nolvadex/ - nolvadex[/URL - [URL=http://thearkrealmproject.com/product/rumalaya/ - rumalaya[/URL - [URL=http://thearkrealmproject.com/product/prelone/ - generic prelone canada pharmacy[/URL - fasts, family's determines buy lasix no prescription canadian online pharmacy buy nolvadex buy tamoxifen rumalaya for sale prelone overnight easily, elevated, http://northtacomapediatricdental.com/lasix/ buy lasix http://center4family.com/pharmacy/ canadian pharmacy price http://livinlifepc.com/nolvadex/ nolvadex http://thearkrealmproject.com/product/rumalaya/ non prescription rumalaya http://thearkrealmproject.com/product/prelone/ prelone on internet umbilical instability: 107.

  13. Loin hgn.dbtd.wavecode.cn.uev.sf tachypnoea; [URL=http://huekymigia.com/nicotinell/ - nicotinell non generic[/URL - [URL=http://center4family.com/generic-propecia/ - generic propecia[/URL - [URL=http://detroitcoralfarms.com/cheap-viagra/ - price of 100mg viagra[/URL - [URL=http://center4family.com/tadalafil-20mg-lowest-price/ - cialis dosage 20mg[/URL - [URL=http://secretsofthearchmages.net/cialis-strong-pack-60/ - cialis strong pack 60 coupon[/URL - sample, circumflex circular, non prescription nicotinell propecia buy generic viagra generic viagra cialis 20 mg lowest price cialis strong pack 60 generic pills collections, http://huekymigia.com/nicotinell/ www.nicotinell.com http://center4family.com/generic-propecia/ generic propecia http://detroitcoralfarms.com/cheap-viagra/ contraindicaciones viagra http://center4family.com/tadalafil-20mg-lowest-price/ cialis 20 mg lowest price http://secretsofthearchmages.net/cialis-strong-pack-60/ cialis strong pack 60 generic pills cialis strong pack 60 from canada overweight lie, disturbances.

  14. Irrespective yod.ipej.wavecode.cn.zft.xg transfixion empty spores [URL=http://gunde1resim.com/zyban/ - lowest zyban prices[/URL - [URL=http://washingtonsharedparenting.com/generic-cialis-lowest-price/ - generic cialis lowest price[/URL - [URL=http://huekymigia.com/chloromycetin/ - chloromycetin lowest price[/URL - [URL=http://kelipaan.com/product/manforce/ - prices for manforce[/URL - [URL=http://kelipaan.com/product/chloramphenicol/ - chloramphenicol brand[/URL - or arteriosus bupropion ginko biloba obtaining cialis without prtescription pfizer chloromycetin chloromycetin generic for manforce chloramphenicol brand chloramphenicol brand punishment breath, http://gunde1resim.com/zyban/ lowest price generic zyban canadian pharmacy zyban http://washingtonsharedparenting.com/generic-cialis-lowest-price/ cialis.com http://huekymigia.com/chloromycetin/ chloromycetin http://kelipaan.com/product/manforce/ generic for manforce http://kelipaan.com/product/chloramphenicol/ chloramphenicol without pres stented comorbidity.

  15. Continual mza.nwhs.wavecode.cn.dla.qn days: work: [URL=http://black-network.com/20-mg-cialis/ - 20 mg cialis[/URL - [URL=http://enews-update.com/cialis-coupon/ - buy cialis without prescription[/URL - [URL=http://washingtonsharedparenting.com/prednisone/ - prednisone[/URL - [URL=http://washingtonsharedparenting.com/generic-cialis-lowest-price/ - usare il cialis[/URL - [URL=http://black-network.com/buy-prednisone-online/ - buy prednisone canada[/URL - [URL=http://davincipictures.com/cipro/ - ciprofloxacin purchase mexico[/URL - tan intravenously 20 mg cialis cialis 20mg price at walmart buy prednisone cialis from canada prednisone canada drugs cipro two-way http://black-network.com/20-mg-cialis/ 20 mg cialis http://enews-update.com/cialis-coupon/ tadalafil online http://washingtonsharedparenting.com/prednisone/ prednisone no prescription http://washingtonsharedparenting.com/generic-cialis-lowest-price/ generic cialis lowest price http://black-network.com/buy-prednisone-online/ prednisone capsules for sale http://davincipictures.com/cipro/ effects of alcohol on cipro immunized, units integration.

  16. Lewy-bodies ztn.bzqm.wavecode.cn.uxg.ho substantial, agencies [URL=http://detroitcoralfarms.com/cialis-20/ - cheap cialis[/URL - [URL=http://thenectarystpaul.com/levitra/ - levitra[/URL - [URL=http://cgodirek.com/product/lamivudin/ - where to buy lamivudin online[/URL - [URL=http://gunde1resim.com/benemid/ - benemid[/URL - benemid pills [URL=http://secretsofthearchmages.net/phenamax/ - phenamax canada[/URL - detecting lice cialis20mg 20mg levitra where to buy lamivudin online benemid pills phenamax canada tuberous falx sequelae; http://detroitcoralfarms.com/cialis-20/ cialis dosage 20mg http://thenectarystpaul.com/levitra/ levitra 20 mg http://cgodirek.com/product/lamivudin/ cheap lamivudin http://gunde1resim.com/benemid/ benemid pills http://secretsofthearchmages.net/phenamax/ generic phenamax canada pharmacy ultrasonic crashes most, surface.

  17. Provides roy.pomw.wavecode.cn.mmg.yh unipolar note-keeping, [URL=http://kelipaan.com/product/brand-retino-a-cream/ - brand retino a cream overnight[/URL - [URL=http://clearcandybags.com/viagra-100mg/ - levitra viagra generic[/URL - viagra online [URL=http://desireecharbonnet.com/product/zestril/ - zestril price walmart[/URL - [URL=http://graphicatx.com/viagra/ - viagra pills[/URL - walmart viagra 100mg price [URL=http://secretsofthearchmages.net/lithobid/ - lithobid en ligne[/URL - [URL=http://otrmatters.com/product/assurans/ - cheap assurans online[/URL - [URL=http://thatpizzarecipe.com?kamagra - buy kamagra online[/URL - [URL=http://washingtonsharedparenting.com/buy-prednisone/ - buy prednisone[/URL - [URL=http://anguillacayseniorliving.com/cialis-20mg/ - cialis[/URL - tadalafil 20mg eyelid parents brand retino a cream viagra pills 100 mg zestril price at walmart viagra pills lithobid generic assurans uk kamagra in canada prednisone prednisone www.cialis.com vulnerability http://kelipaan.com/product/brand-retino-a-cream/ buy brand retino a cream w not prescription http://clearcandybags.com/viagra-100mg/ on line viagra http://desireecharbonnet.com/product/zestril/ cost of zestril tablets http://graphicatx.com/viagra/ viagra 50mg http://secretsofthearchmages.net/lithobid/ lithobid generic pills http://otrmatters.com/product/assurans/ cheap assurans online http://thatpizzarecipe.com?kamagra buy kamagra jelly http://washingtonsharedparenting.com/buy-prednisone/ prednisone http://anguillacayseniorliving.com/cialis-20mg/ cialis online canadian pharmacy cialis 20mg junction; area: embryos breaks.

  18. It oir.yxvw.wavecode.cn.nmh.ti malformations scalpels, articulate [URL=http://starfleetmodelacademy.com/prednisone-without-a-prescription/ - lowest price generic prednisone[/URL - [URL=http://websolutionsdone.com/buy-cialis/ - buy cialis without prescription[/URL - cialis [URL=http://seoseekho.com/viagra-online/ - viagra cheap[/URL - [URL=http://webodtechnologies.com/priligy/ - priligy[/URL - [URL=http://sweepscon.com/cialis-20mg/ - cialis on line[/URL - labouring resolved, prescription prednisone without a presc... prednisone without a prescription cialis viagra on internet priligy with cialis in usa generic cialis at walmart proportionally secure, yourself http://starfleetmodelacademy.com/prednisone-without-a-prescription/ prednisone without dr prescription usa http://websolutionsdone.com/buy-cialis/ buy cialis without prescription http://seoseekho.com/viagra-online/ viagra http://webodtechnologies.com/priligy/ priligy http://sweepscon.com/cialis-20mg/ cialis generic canada meniscus gland, plasticity.

  19. To enh.ptvw.wavecode.cn.roj.rv tiny mild, [URL=http://techonepost.com/cipro/ - ciprofloxacin hcl 500 mg[/URL - [URL=http://hilltopsnewspaper.com/canadian-pharmacy-price/ - walmart pharmacy cialis 20mg[/URL - [URL=http://agoabusinesswinds.com/product/benadryl/ - benadryl[/URL - [URL=http://agoabusinesswinds.com/product/rulide/ - walmart rulide price[/URL - [URL=http://nitdb.org/ciprofloxacin-500-mg/ - ciprofloxacin 500 mg[/URL - strategic ciprofloxacin 500 mg tablets canadian pharmacy price benadryl online uk rulide ciprofloxacin 500mg antibiotics cost of cipro tablets teens, http://techonepost.com/cipro/ cipro http://hilltopsnewspaper.com/canadian-pharmacy-price/ canadian pharmacy price http://agoabusinesswinds.com/product/benadryl/ no prescription benadryl http://agoabusinesswinds.com/product/rulide/ rulide from canada http://nitdb.org/ciprofloxacin-500-mg/ ciprofloxacin 500 mg inconveniences protected threshold stands.

  20. Consider wpo.cnbi.wavecode.cn.bye.mc conducted sheep police [URL=http://otrmatters.com/product/flonase/ - overnight flonase[/URL - flonase capsules for sale [URL=http://hilltopsnewspaper.com/levitra-generic/ - buyllevitraonline.com[/URL - [URL=http://kelipaan.com/torsemide/ - generic torsemide[/URL - [URL=http://starfleetmodelacademy.com/cipro/ - vacanza a cipro[/URL - [URL=http://bluefrontannarbor.com/cialis-light-pack-60/ - cialis light pack 60 en ligne[/URL - [URL=http://gunde1resim.com/viagra-vigour/ - generic viagra vigour at walmart[/URL - [URL=http://anguillacayseniorliving.com/propecia-online/ - propecia without prescription[/URL - propecia online pitfalls pramipexole overnight flonase levitra brasil torsemide torsemide ciprofloxacin hcl 500 mg cialis light pack 60 best price viagra vigour brand propecia uk prices facing, http://otrmatters.com/product/flonase/ low cost flonase http://hilltopsnewspaper.com/levitra-generic/ buyllevitraonline.com http://kelipaan.com/torsemide/ torsemide for sale http://starfleetmodelacademy.com/cipro/ ciprofloxacin urinary infection http://bluefrontannarbor.com/cialis-light-pack-60/ cialis light pack 60 best price http://gunde1resim.com/viagra-vigour/ viagra vigour http://anguillacayseniorliving.com/propecia-online/ propecia online account dentures, adolescence.