You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Vue, the hmrId property in the compiled code is still present when building for production, and contains the full path of the source markdown file, adding extra bytes of payload and possibly exposing internal information.
Production build result (line breaks added for readability):
import{oasi,casn,Fasa,aase}from"./index-C12kFbxv.js";constm={title:"Hello world"},l=e("h1",null,"Hello world",-1),r=e("p",null,"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",-1),u=e("p",null,[e("img",{src:"favicon.ico",alt:"hi"})],-1);functiono(t,s){returni(),n(a,null,[l,r,u],64)}constc={render:o};c.__hmrId="/home/will/playground/md-test/src/content/blog/hello.md";constp=t=>({components:t,render:o});export{casVueComponent,pasVueComponentWith,masattributes};
If I understand this right, the hmr id could be removed when there is no hmr by checking for import.meta.hot.
The text was updated successfully, but these errors were encountered:
hi,
Thank you for the useful plugin.
When using Vue, the
hmrId
property in the compiled code is still present when building for production, and contains the full path of the source markdown file, adding extra bytes of payload and possibly exposing internal information.Relevant line in the source code:
vite-plugin-markdown/src/index.ts
Line 156 in 1c1dfb4
Production build result (line breaks added for readability):
If I understand this right, the hmr id could be removed when there is no hmr by checking for import.meta.hot.
The text was updated successfully, but these errors were encountered: