webpack-code-inspector-plugin
Advanced tools
Comparing version 0.10.1 to 0.11.0
@@ -1,1 +0,1 @@ | ||
(function(t,e){typeof exports=="object"&&typeof module!="undefined"?module.exports=e(require("code-inspector-core"),require("path")):typeof define=="function"&&define.amd?define(["code-inspector-core","path"],e):(t=typeof globalThis!="undefined"?globalThis:t||self,t.WebpackCodeInspectorPlugin=e(t.codeInspectorCore,t.path))})(this,function(t,e){"use strict";var _=Object.defineProperty,T=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var v=(t,e,s)=>e in t?_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))D.call(e,s)&&v(t,s,e[s]);if(j)for(var s of j(e))E.call(e,s)&&v(t,s,e[s]);return t},h=(t,e)=>T(t,L(e));let s="";typeof __dirname!="undefined"?s=__dirname:s=e.dirname(t.fileURLToPath(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:document.currentScript&&document.currentScript.src||new URL("index.umd.js",document.baseURI).href));let i=!0;const x=(r,n)=>{var u,c;if(!i)return;i=!1;const d=(n==null?void 0:n.compiler)||n,o=(u=d==null?void 0:d.options)==null?void 0:u.module;((o==null?void 0:o.rules)||(o==null?void 0:o.loaders)||[]).push(f({test:(c=r==null?void 0:r.match)!=null?c:/\.(vue|jsx|tsx|js|ts|mjs|mts)$/,exclude:/node_modules/,use:[{loader:e.resolve(s,"./loader.js")}]},r.enforcePre===!1?{}:{enforce:"pre"}),h(f({},r!=null&&r.injectTo?{resource:r==null?void 0:r.injectTo}:{test:/\.(jsx|tsx|js|ts|mjs|mts)$/,exclude:/node_modules/}),{use:[{loader:e.resolve(s,"./inject-loader.js"),options:r}],enforce:"post"}))};class m{constructor(n){this.options=n||{}}apply(n){var a,u,c,l,p,y;if(i=!0,this.options.close)return;let d;if(typeof((a=this.options)==null?void 0:a.dev)=="function"?d=(u=this.options)==null?void 0:u.dev():d=(c=this.options)==null?void 0:c.dev,d===!1||!d&&((l=n==null?void 0:n.options)==null?void 0:l.mode)!=="development"&&process.env.NODE_ENV!=="development")return;((y=(p=n==null?void 0:n.options)==null?void 0:p.cache)==null?void 0:y.type)==="filesystem"&&(n.options.cache.version="code-inspector-".concat(Date.now()));const o={port:0,entry:"",nextJsEntry:"",ssrEntry:""};x(h(f({},this.options),{record:o}),n)}}return m}); | ||
(function(t,e){typeof exports=="object"&&typeof module!="undefined"?module.exports=e(require("code-inspector-core"),require("path")):typeof define=="function"&&define.amd?define(["code-inspector-core","path"],e):(t=typeof globalThis!="undefined"?globalThis:t||self,t.WebpackCodeInspectorPlugin=e(t.codeInspectorCore,t.path))})(this,function(t,e){"use strict";var _=Object.defineProperty,T=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var v=(t,e,s)=>e in t?_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))D.call(e,s)&&v(t,s,e[s]);if(p)for(var s of p(e))E.call(e,s)&&v(t,s,e[s]);return t},h=(t,e)=>T(t,L(e));let s="";typeof __dirname!="undefined"?s=__dirname:s=e.dirname(t.fileURLToPath(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:document.currentScript&&document.currentScript.src||new URL("index.umd.js",document.baseURI).href));let i=!0;const x=(r,n)=>{var u,c;if(!i)return;i=!1;const d=(n==null?void 0:n.compiler)||n,o=(u=d==null?void 0:d.options)==null?void 0:u.module;((o==null?void 0:o.rules)||(o==null?void 0:o.loaders)||[]).push(f({test:(c=r==null?void 0:r.match)!=null?c:/\.(vue|jsx|tsx|js|ts|mjs|mts)$/,exclude:/node_modules/,use:[{loader:e.resolve(s,"./loader.js"),options:r}]},r.enforcePre===!1?{}:{enforce:"pre"}),h(f({},r!=null&&r.injectTo?{resource:r==null?void 0:r.injectTo}:{test:/\.(jsx|tsx|js|ts|mjs|mts)$/,exclude:/node_modules/}),{use:[{loader:e.resolve(s,"./inject-loader.js"),options:r}],enforce:"post"}))};class m{constructor(n){this.options=n||{}}apply(n){var a,u,c,l,y,j;if(i=!0,this.options.close)return;let d;if(typeof((a=this.options)==null?void 0:a.dev)=="function"?d=(u=this.options)==null?void 0:u.dev():d=(c=this.options)==null?void 0:c.dev,d===!1||!d&&((l=n==null?void 0:n.options)==null?void 0:l.mode)!=="development"&&process.env.NODE_ENV!=="development")return;((j=(y=n==null?void 0:n.options)==null?void 0:y.cache)==null?void 0:j.type)==="filesystem"&&(n.options.cache.version="code-inspector-".concat(Date.now()));const o={port:0,entry:"",nextJsEntry:"",ssrEntry:""};x(h(f({},this.options),{record:o}),n)}}return m}); |
@@ -1,1 +0,1 @@ | ||
(function(t,e){typeof exports=="object"&&typeof module!="undefined"?module.exports=e(require("code-inspector-core"),require("path")):typeof define=="function"&&define.amd?define(["code-inspector-core","path"],e):(t=typeof globalThis!="undefined"?globalThis:t||self,t.WebpackCodeInspectorPlugin=e(t.codeInspectorCore,t.path))})(this,function(t,e){"use strict";var _=Object.defineProperty,T=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var j=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var v=(t,e,s)=>e in t?_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))D.call(e,s)&&v(t,s,e[s]);if(j)for(var s of j(e))E.call(e,s)&&v(t,s,e[s]);return t},h=(t,e)=>T(t,L(e));let s="";typeof __dirname!="undefined"?s=__dirname:s=e.dirname(t.fileURLToPath(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:document.currentScript&&document.currentScript.src||new URL("index.umd.js",document.baseURI).href));let i=!0;const x=(r,n)=>{var u,c;if(!i)return;i=!1;const d=(n==null?void 0:n.compiler)||n,o=(u=d==null?void 0:d.options)==null?void 0:u.module;((o==null?void 0:o.rules)||(o==null?void 0:o.loaders)||[]).push(f({test:(c=r==null?void 0:r.match)!=null?c:/\.(vue|jsx|tsx|js|ts|mjs|mts)$/,exclude:/node_modules/,use:[{loader:e.resolve(s,"./loader.js")}]},r.enforcePre===!1?{}:{enforce:"pre"}),h(f({},r!=null&&r.injectTo?{resource:r==null?void 0:r.injectTo}:{test:/\.(jsx|tsx|js|ts|mjs|mts)$/,exclude:/node_modules/}),{use:[{loader:e.resolve(s,"./inject-loader.js"),options:r}],enforce:"post"}))};class m{constructor(n){this.options=n||{}}apply(n){var a,u,c,l,p,y;if(i=!0,this.options.close)return;let d;if(typeof((a=this.options)==null?void 0:a.dev)=="function"?d=(u=this.options)==null?void 0:u.dev():d=(c=this.options)==null?void 0:c.dev,d===!1||!d&&((l=n==null?void 0:n.options)==null?void 0:l.mode)!=="development"&&process.env.NODE_ENV!=="development")return;((y=(p=n==null?void 0:n.options)==null?void 0:p.cache)==null?void 0:y.type)==="filesystem"&&(n.options.cache.version="code-inspector-".concat(Date.now()));const o={port:0,entry:"",nextJsEntry:"",ssrEntry:""};x(h(f({},this.options),{record:o}),n)}}return m}); | ||
(function(t,e){typeof exports=="object"&&typeof module!="undefined"?module.exports=e(require("code-inspector-core"),require("path")):typeof define=="function"&&define.amd?define(["code-inspector-core","path"],e):(t=typeof globalThis!="undefined"?globalThis:t||self,t.WebpackCodeInspectorPlugin=e(t.codeInspectorCore,t.path))})(this,function(t,e){"use strict";var _=Object.defineProperty,T=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var v=(t,e,s)=>e in t?_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))D.call(e,s)&&v(t,s,e[s]);if(p)for(var s of p(e))E.call(e,s)&&v(t,s,e[s]);return t},h=(t,e)=>T(t,L(e));let s="";typeof __dirname!="undefined"?s=__dirname:s=e.dirname(t.fileURLToPath(typeof document=="undefined"&&typeof location=="undefined"?require("url").pathToFileURL(__filename).href:typeof document=="undefined"?location.href:document.currentScript&&document.currentScript.src||new URL("index.umd.js",document.baseURI).href));let i=!0;const x=(r,n)=>{var u,c;if(!i)return;i=!1;const d=(n==null?void 0:n.compiler)||n,o=(u=d==null?void 0:d.options)==null?void 0:u.module;((o==null?void 0:o.rules)||(o==null?void 0:o.loaders)||[]).push(f({test:(c=r==null?void 0:r.match)!=null?c:/\.(vue|jsx|tsx|js|ts|mjs|mts)$/,exclude:/node_modules/,use:[{loader:e.resolve(s,"./loader.js"),options:r}]},r.enforcePre===!1?{}:{enforce:"pre"}),h(f({},r!=null&&r.injectTo?{resource:r==null?void 0:r.injectTo}:{test:/\.(jsx|tsx|js|ts|mjs|mts)$/,exclude:/node_modules/}),{use:[{loader:e.resolve(s,"./inject-loader.js"),options:r}],enforce:"post"}))};class m{constructor(n){this.options=n||{}}apply(n){var a,u,c,l,y,j;if(i=!0,this.options.close)return;let d;if(typeof((a=this.options)==null?void 0:a.dev)=="function"?d=(u=this.options)==null?void 0:u.dev():d=(c=this.options)==null?void 0:c.dev,d===!1||!d&&((l=n==null?void 0:n.options)==null?void 0:l.mode)!=="development"&&process.env.NODE_ENV!=="development")return;((j=(y=n==null?void 0:n.options)==null?void 0:y.cache)==null?void 0:j.type)==="filesystem"&&(n.options.cache.version="code-inspector-".concat(Date.now()));const o={port:0,entry:"",nextJsEntry:"",ssrEntry:""};x(h(f({},this.options),{record:o}),n)}}return m}); |
@@ -1,1 +0,1 @@ | ||
"use strict";var f=(t,e,s)=>new Promise((l,o)=>{var p=r=>{try{n(s.next(r))}catch(i){o(i)}},u=r=>{try{n(s.throw(r))}catch(i){o(i)}},n=r=>r.done?l(r.value):Promise.resolve(r.value).then(p,u);n((s=s.apply(t,e)).next())});const c=require("code-inspector-core"),x=["isJsx","isTsx","lang.jsx","lang.tsx"];function g(t){return f(this,null,function*(){var n,r;this.cacheable&&this.cacheable(!0);const e=c.normalizePath(this.resourcePath);let s=new URLSearchParams(this.resource);if(c.isJsTypeFile(e)||e.endsWith(".vue")&&x.some(i=>s.get(i)!==null))return c.transformCode({content:t,filePath:e,fileType:"jsx"});if(e.endsWith(".vue")&&(s.get("lang")==="tsx"||s.get("lang")==="jsx")){const{descriptor:i}=c.parseSFC(t,{sourceMap:!1}),h=[(n=i.script)==null?void 0:n.content,(r=i.scriptSetup)==null?void 0:r.content];for(const a of h){if(!a)continue;const d=c.transformCode({content:a,filePath:e,fileType:"jsx"});t=t.replace(a,d)}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"}):e.endsWith(".svelte")?c.transformCode({content:t,filePath:e,fileType:"svelte"}):t})}module.exports=g; | ||
"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; |
{ | ||
"name": "webpack-code-inspector-plugin", | ||
"version": "0.10.1", | ||
"version": "0.11.0", | ||
"main": "./dist/index.umd.js", | ||
@@ -41,3 +41,3 @@ "module": "./dist/index.mjs", | ||
"dependencies": { | ||
"code-inspector-core": "0.10.1" | ||
"code-inspector-core": "0.11.0" | ||
}, | ||
@@ -44,0 +44,0 @@ "devDependencies": { |
@@ -302,3 +302,3 @@ <div align="center"> | ||
Sponsor this project to support my better creation. It is recommended to use afdian to subscribe, and your avatar will appear in this project. | ||
Sponsoring this project can help the author create better . If you needed, you can contact the author to have your avatar added to the list of sponsors. | ||
@@ -305,0 +305,0 @@ - Afdian(爱发电): https://afdian.net/a/zhoulixiang |
Sorry, the diff of this file is not supported yet
21529
110
+ Addedcode-inspector-core@0.11.0(transitive)
- Removedcode-inspector-core@0.10.1(transitive)
Updatedcode-inspector-core@0.11.0