webpack-code-inspector-plugin
Advanced tools
Comparing version 0.18.0 to 0.18.1-beta.0
@@ -1,1 +0,1 @@ | ||
"use strict";var d=(t,e,s)=>new Promise((p,i)=>{var u=r=>{try{n(s.next(r))}catch(o){i(o)}},f=r=>{try{n(s.throw(r))}catch(o){i(o)}},n=r=>r.done?p(r.value):Promise.resolve(r.value).then(u,f);n((s=s.apply(t,e)).next())});const c=require("code-inspector-core"),y=["isJsx","isTsx","lang.jsx","lang.tsx"];function S(t){return d(this,null,function*(){var o,h;this.cacheable&&this.cacheable(!0);const e=c.normalizePath(this.resourcePath);let s=new URLSearchParams(this.resource);const p=this.query,{escapeTags:i=[]}=p||{};if(c.isJsTypeFile(e)||e.endsWith(".vue")&&y.some(a=>s.get(a)!==null))return c.transformCode({content:t,filePath:e,fileType:"jsx",escapeTags:i});if(e.endsWith(".vue")&&(s.get("lang")==="tsx"||s.get("lang")==="jsx")){const{descriptor:a}=c.parseSFC(t,{sourceMap:!1}),x=[(o=a.script)==null?void 0:o.content,(h=a.scriptSetup)==null?void 0:h.content];for(const l of x){if(!l)continue;const g=c.transformCode({content:l,filePath:e,fileType:"jsx",escapeTags:i});t=t.replace(l,g)}return t}return e.endsWith(".vue")&&s.get("type")!=="style"&&s.get("type")!=="script"&&s.get("raw")===null?c.transformCode({content:t,filePath:e,fileType:"vue",escapeTags:i}):e.endsWith(".svelte")?c.transformCode({content:t,filePath:e,fileType:"svelte",escapeTags:i}):t})}module.exports=S; | ||
"use strict";var d=(t,e,s)=>new Promise((p,a)=>{var l=i=>{try{n(s.next(i))}catch(c){a(c)}},f=i=>{try{n(s.throw(i))}catch(c){a(c)}},n=i=>i.done?p(i.value):Promise.resolve(i.value).then(l,f);n((s=s.apply(t,e)).next())});const r=require("code-inspector-core"),y=["isJsx","isTsx","lang.jsx","lang.tsx"];function S(t){return d(this,null,function*(){var h,g;this.cacheable&&this.cacheable(!0);let e=r.normalizePath(this.resourcePath),s=new URLSearchParams(this.resource);const p=this.query,{escapeTags:a=[],mappings:l}=p||{};if(e=r.getMappingFilePath(e,l),r.isJsTypeFile(e)||e.endsWith(".vue")&&y.some(o=>s.get(o)!==null))return r.transformCode({content:t,filePath:e,fileType:"jsx",escapeTags:a});if(e.endsWith(".vue")&&(s.get("lang")==="tsx"||s.get("lang")==="jsx")){const{descriptor:o}=r.parseSFC(t,{sourceMap:!1}),x=[(h=o.script)==null?void 0:h.content,(g=o.scriptSetup)==null?void 0:g.content];for(const u of x){if(!u)continue;const m=r.transformCode({content:u,filePath:e,fileType:"jsx",escapeTags:a});t=t.replace(u,m)}return t}return e.endsWith(".vue")&&s.get("type")!=="style"&&s.get("type")!=="script"&&s.get("raw")===null?r.transformCode({content:t,filePath:e,fileType:"vue",escapeTags:a}):e.endsWith(".svelte")?r.transformCode({content:t,filePath:e,fileType:"svelte",escapeTags:a}):t})}module.exports=S; |
{ | ||
"name": "webpack-code-inspector-plugin", | ||
"version": "0.18.0", | ||
"version": "0.18.1-beta.0", | ||
"main": "./dist/index.umd.js", | ||
@@ -41,3 +41,3 @@ "module": "./dist/index.mjs", | ||
"dependencies": { | ||
"code-inspector-core": "0.18.0" | ||
"code-inspector-core": "0.18.1-beta.0" | ||
}, | ||
@@ -44,0 +44,0 @@ "devDependencies": { |
24734
223
+ Addedcode-inspector-core@0.18.1-beta.0(transitive)
- Removedcode-inspector-core@0.18.0(transitive)