Broke page styles of Vue.js app (Webpack template) when live changing it in Chrome DevTools

后端 未结 4 1198
后悔当初
后悔当初 2021-02-14 06:54

Steps to reproduce

I have application bootstrapped from vue-cli with a webpack template. I\'m running it on Chrome 65.0.3325.146

4条回答
  •  没有蜡笔的小新
    2021-02-14 07:35

    I had this issue, but only when I had multiple blocks in one component.

    E.g.,

    
    
    
    

    I couldn't work out the exact cause, except I noted that I could see that the sources devtools tab only ever shows one inline style block, so figure there's some fragile trickery there. My quick workaround was to simply move at least one of the style blocks into its own file.

    
    
    
    

    I don't know why this worked. Hope it helps someone.

提交回复
热议问题