vite-plugin-strip-comments 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![ci](https://github.com/thednp/vite-plugin-strip-comments/actions/workflows/ci.yml/badge.svg)](https://github.com/thednp/vite-plugin-strip-comments/actions/workflows/ci.yml)
5
5
  [![NPM Version](https://img.shields.io/npm/v/vite-plugin-strip-comments.svg)](https://www.npmjs.com/package/vite-plugin-strip-comments)
6
6
  [![NPM Downloads](https://img.shields.io/npm/dm/vite-plugin-strip-comments.svg)](http://npm-stat.com/charts.html?package=vite-plugin-strip-comments)
7
- [![typescript version](https://img.shields.io/badge/typescript-5.6.3-brightgreen)](https://www.typescriptlang.org/)
7
+ [![typescript version](https://img.shields.io/badge/typescript-5.7.2-brightgreen)](https://www.typescriptlang.org/)
8
8
  [![vitest version](https://img.shields.io/badge/vitest-2.1.5-brightgreen)](https://vitest.dev/)
9
9
  [![vite version](https://img.shields.io/badge/vite-5.4.11-brightgreen)](https://github.com/vitejs)
10
10
 
@@ -37,17 +37,17 @@ import stripComments from 'vite-plugin-strip-comments';
37
37
  export default defineConfig({
38
38
  plugins: [
39
39
  // ... other plugins
40
- stripComments({ type: 'istanbul' }),
40
+ stripComments({ type: 'none' }),
41
+ // 'none' means to keep no comments
41
42
  ],
42
43
  });
43
44
  ```
44
45
 
45
46
  **Options**
46
47
 
47
- * type: "none" | "keep-legal" | "istanbul" (default) - changes the behavior of the transform function
48
+ * type: "none" | "keep-legal" (default) - changes the behavior of the transform function
48
49
  * **none** removes all comments
49
50
  * **keep-legal** remove all commments except those which contain `@legal` or `@license`, a very good practice to allow open source to shine yes?
50
- * **istanbul** (default) only remove comments that target istanbul code coverage instrumentation (EG: `/* istanbul ignore else @preserve */`)
51
51
  * enforce: "pre" (default) | "post" - determines where in the compilation pipeline the plugin should work;
52
52
 
53
53
  ## Contributions
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";const c={type:"istanbul",enforce:"pre"},p=(l={})=>{const s={type:["none","keep-legal","istanbul"].some(e=>e===l.type)?l.type:c.type,enforce:["pre","post"].some(e=>e===l.enforce)?l.enforce:c.enforce};return{name:"vite-plugin-strip-comments",enforce:s.enforce,transform(e,o){if(!o||o.includes("node_modules"))return e;let t=e,n;const a=Array.from(e.matchAll(/\/\*[\s\S]*?\*\/|\/\/.*/gm));for(let r=0;r<a.length;r+=1)switch([n]=a[r],s.type){case"keep-legal":["@legal","@license"].some(i=>n.includes(i))||(t=t.replaceAll(n,""));break;case"istanbul":n.includes("istanbul")&&(t=t.replaceAll(n,""));break;case"none":default:t=t.replaceAll(n,"")}return t}}};module.exports=p;
1
+ "use strict";const a={type:"keep-legal",enforce:"pre"},m=(n={})=>{const o={type:["none","keep-legal"].some(e=>e===n.type)?n.type:a.type,enforce:["pre","post"].some(e=>e===n.enforce)?n.enforce:a.enforce};return{name:"vite-plugin-strip-comments",enforce:o.enforce,apply:"build",transform(e,l){if(!l||l.includes("node_modules")||!/\.([jt]sx?)$/.test(l))return{code:e,map:null};let t=e,r;const p=Array.from(e.matchAll(/\/\*[\s\S]*?\*\/|\/\*\*.*?\*\/|\/\/.*(?=\n)?/gm));for(let s=0;s<p.length;s+=1)switch([r]=p[s],o.type){case"keep-legal":["@legal","@license"].some(c=>r.includes(c))||(t=t.replace(r,""));break;case"none":default:t=t.replace(r,"")}return{code:t,map:null}}}};module.exports=m;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import { type Plugin } from \"vite\";\n\nexport type StripCommentsPlugin = Plugin & {\n name: string;\n enforce: \"pre\" | \"post\" | undefined;\n transform: (\n code: string,\n id?: string,\n ) => string;\n};\n\nexport type StripCommentsConfig = {\n type: \"none\" | \"keep-legal\" | \"istanbul\";\n enforce: \"pre\" | \"post\" | undefined;\n};\n\nconst StripCommentsDefaultConfig: StripCommentsConfig = {\n type: \"istanbul\",\n enforce: \"pre\",\n};\n\nconst stripComments = (cfg: Partial<StripCommentsConfig> = {}) => {\n const config: Partial<StripCommentsConfig> = {\n type:\n ([\"none\", \"keep-legal\", \"istanbul\"].some((x) => x === cfg.type)\n ? cfg.type\n : StripCommentsDefaultConfig.type) as StripCommentsConfig[\"type\"],\n enforce:\n ([\"pre\", \"post\"].some((x) => x === cfg.enforce)\n ? cfg.enforce\n : StripCommentsDefaultConfig.enforce) as StripCommentsConfig[\"enforce\"],\n };\n\n return {\n name: \"vite-plugin-strip-comments\",\n enforce: config.enforce,\n transform(code: string, id?: string) {\n /* istanbul ignore if @preserve */\n if (!id || id.includes(\"node_modules\")) return code;\n let result = code;\n let match: string;\n\n const matchesArray = Array.from(code.matchAll(\n /\\/\\*[\\s\\S]*?\\*\\/|\\/\\/.*/gm,\n ));\n\n for (let i = 0; i < matchesArray.length; i += 1) {\n // capture first match\n [match] = matchesArray[i];\n\n switch (config.type) {\n case \"keep-legal\":\n if (![\"@legal\", \"@license\"].some((x) => match.includes(x))) {\n result = result.replaceAll(match, \"\");\n }\n break;\n case \"istanbul\":\n if (match.includes(\"istanbul\")) {\n /* istanbul ignore next @preserve */\n result = result.replaceAll(match, \"\");\n }\n break;\n case \"none\":\n default:\n result = result.replaceAll(match, \"\");\n }\n }\n\n return result;\n },\n } satisfies StripCommentsPlugin;\n};\n\nexport default stripComments;\n"],"names":["StripCommentsDefaultConfig","stripComments","cfg","config","x","code","id","result","match","matchesArray","i"],"mappings":"aAgBA,MAAMA,EAAkD,CACtD,KAAM,WACN,QAAS,KACX,EAEMC,EAAgB,CAACC,EAAoC,KAAO,CAChE,MAAMC,EAAuC,CAC3C,KACG,CAAC,OAAQ,aAAc,UAAU,EAAE,KAAMC,GAAMA,IAAMF,EAAI,IAAI,EAC1DA,EAAI,KACJF,EAA2B,KACjC,QACG,CAAC,MAAO,MAAM,EAAE,KAAMI,GAAMA,IAAMF,EAAI,OAAO,EAC1CA,EAAI,QACJF,EAA2B,OACnC,EAEO,MAAA,CACL,KAAM,6BACN,QAASG,EAAO,QAChB,UAAUE,EAAcC,EAAa,CAEnC,GAAI,CAACA,GAAMA,EAAG,SAAS,cAAc,EAAU,OAAAD,EAC/C,IAAIE,EAASF,EACTG,EAEE,MAAAC,EAAe,MAAM,KAAKJ,EAAK,SACnC,2BAAA,CACD,EAED,QAASK,EAAI,EAAGA,EAAID,EAAa,OAAQC,GAAK,EAI5C,OAFC,CAAAF,CAAK,EAAIC,EAAaC,CAAC,EAEhBP,EAAO,KAAM,CACnB,IAAK,aACE,CAAC,SAAU,UAAU,EAAE,KAAMC,GAAMI,EAAM,SAASJ,CAAC,CAAC,IAC9CG,EAAAA,EAAO,WAAWC,EAAO,EAAE,GAEtC,MACF,IAAK,WACCA,EAAM,SAAS,UAAU,IAElBD,EAAAA,EAAO,WAAWC,EAAO,EAAE,GAEtC,MACF,IAAK,OACL,QACWD,EAAAA,EAAO,WAAWC,EAAO,EAAE,CAAA,CAInC,OAAAD,CAAA,CAEX,CACF"}
1
+ {"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import { type Plugin } from \"vite\";\n\nexport type StripCommentsPlugin = Plugin<StripCommentsConfig> & {\n name: string;\n enforce: \"pre\" | \"post\" | undefined;\n apply: \"build\";\n transform: (\n code: string,\n id?: string,\n ) => {\n code: string;\n map: string | null;\n };\n};\n\nexport type StripCommentsConfig = {\n type: \"none\" | \"keep-legal\";\n enforce: \"pre\" | \"post\" | undefined;\n};\n\nconst StripCommentsDefaultConfig: StripCommentsConfig = {\n type: \"keep-legal\",\n enforce: \"pre\",\n};\n\nconst stripComments = (cfg: Partial<StripCommentsConfig> = {}) => {\n const config: Partial<StripCommentsConfig> = {\n type:\n ([\"none\", \"keep-legal\"].some((x) => x === cfg.type)\n ? cfg.type\n : StripCommentsDefaultConfig.type) as StripCommentsConfig[\"type\"],\n enforce:\n ([\"pre\", \"post\"].some((x) => x === cfg.enforce)\n ? cfg.enforce\n : StripCommentsDefaultConfig.enforce) as StripCommentsConfig[\"enforce\"],\n };\n\n return {\n name: \"vite-plugin-strip-comments\",\n enforce: config.enforce,\n apply: \"build\",\n transform(code: string, id?: string): { code: string; map: null } {\n /* istanbul ignore if @preserve */\n if (!id || id.includes(\"node_modules\") || !/\\.([jt]sx?)$/.test(id)) {\n return { code, map: null };\n }\n let result = code;\n let match: string;\n\n const matchesArray = Array.from(code.matchAll(\n /\\/\\*[\\s\\S]*?\\*\\/|\\/\\*\\*.*?\\*\\/|\\/\\/.*(?=\\n)?/gm,\n ));\n\n for (let i = 0; i < matchesArray.length; i += 1) {\n // first match\n [match] = matchesArray[i];\n\n switch (config.type) {\n case \"keep-legal\":\n if (![\"@legal\", \"@license\"].some((x) => match.includes(x))) {\n result = result.replace(match, \"\");\n }\n break;\n case \"none\":\n default:\n result = result.replace(match, \"\");\n }\n }\n\n return { code: result, map: null };\n },\n } satisfies StripCommentsPlugin;\n};\n\nexport default stripComments;\n"],"names":["StripCommentsDefaultConfig","stripComments","cfg","config","x","code","id","result","match","matchesArray","i"],"mappings":"aAoBA,MAAMA,EAAkD,CACtD,KAAM,aACN,QAAS,KACX,EAEMC,EAAgB,CAACC,EAAoC,KAAO,CAChE,MAAMC,EAAuC,CAC3C,KACG,CAAC,OAAQ,YAAY,EAAE,KAAMC,GAAMA,IAAMF,EAAI,IAAI,EAC9CA,EAAI,KACJF,EAA2B,KACjC,QACG,CAAC,MAAO,MAAM,EAAE,KAAMI,GAAMA,IAAMF,EAAI,OAAO,EAC1CA,EAAI,QACJF,EAA2B,OACnC,EAEO,MAAA,CACL,KAAM,6BACN,QAASG,EAAO,QAChB,MAAO,QACP,UAAUE,EAAcC,EAA0C,CAE5D,GAAA,CAACA,GAAMA,EAAG,SAAS,cAAc,GAAK,CAAC,eAAe,KAAKA,CAAE,EACxD,MAAA,CAAE,KAAAD,EAAM,IAAK,IAAK,EAE3B,IAAIE,EAASF,EACTG,EAEE,MAAAC,EAAe,MAAM,KAAKJ,EAAK,SACnC,gDAAA,CACD,EAED,QAASK,EAAI,EAAGA,EAAID,EAAa,OAAQC,GAAK,EAI5C,OAFC,CAAAF,CAAK,EAAIC,EAAaC,CAAC,EAEhBP,EAAO,KAAM,CACnB,IAAK,aACE,CAAC,SAAU,UAAU,EAAE,KAAMC,GAAMI,EAAM,SAASJ,CAAC,CAAC,IAC9CG,EAAAA,EAAO,QAAQC,EAAO,EAAE,GAEnC,MACF,IAAK,OACL,QACWD,EAAAA,EAAO,QAAQC,EAAO,EAAE,CAAA,CAIvC,MAAO,CAAE,KAAMD,EAAQ,IAAK,IAAK,CAAA,CAErC,CACF"}
package/dist/index.d.ts CHANGED
@@ -1,12 +1,16 @@
1
1
  declare const stripComments: (cfg?: Partial<StripCommentsConfig>) => {
2
2
  name: string;
3
3
  enforce: "pre" | "post" | undefined;
4
- transform(code: string, id?: string): string;
4
+ apply: "build";
5
+ transform(code: string, id?: string): {
6
+ code: string;
7
+ map: null;
8
+ };
5
9
  };
6
10
  export default stripComments;
7
11
 
8
12
  declare type StripCommentsConfig = {
9
- type: "none" | "keep-legal" | "istanbul";
13
+ type: "none" | "keep-legal";
10
14
  enforce: "pre" | "post" | undefined;
11
15
  };
12
16
 
package/dist/index.mjs CHANGED
@@ -1,37 +1,36 @@
1
- const c = {
2
- type: "istanbul",
1
+ const p = {
2
+ type: "keep-legal",
3
3
  enforce: "pre"
4
- }, p = (l = {}) => {
4
+ }, m = (n = {}) => {
5
5
  const s = {
6
- type: ["none", "keep-legal", "istanbul"].some((e) => e === l.type) ? l.type : c.type,
7
- enforce: ["pre", "post"].some((e) => e === l.enforce) ? l.enforce : c.enforce
6
+ type: ["none", "keep-legal"].some((e) => e === n.type) ? n.type : p.type,
7
+ enforce: ["pre", "post"].some((e) => e === n.enforce) ? n.enforce : p.enforce
8
8
  };
9
9
  return {
10
10
  name: "vite-plugin-strip-comments",
11
11
  enforce: s.enforce,
12
- transform(e, a) {
13
- if (!a || a.includes("node_modules")) return e;
14
- let t = e, n;
15
- const o = Array.from(e.matchAll(
16
- /\/\*[\s\S]*?\*\/|\/\/.*/gm
12
+ apply: "build",
13
+ transform(e, r) {
14
+ if (!r || r.includes("node_modules") || !/\.([jt]sx?)$/.test(r))
15
+ return { code: e, map: null };
16
+ let t = e, l;
17
+ const a = Array.from(e.matchAll(
18
+ /\/\*[\s\S]*?\*\/|\/\*\*.*?\*\/|\/\/.*(?=\n)?/gm
17
19
  ));
18
- for (let r = 0; r < o.length; r += 1)
19
- switch ([n] = o[r], s.type) {
20
+ for (let o = 0; o < a.length; o += 1)
21
+ switch ([l] = a[o], s.type) {
20
22
  case "keep-legal":
21
- ["@legal", "@license"].some((i) => n.includes(i)) || (t = t.replaceAll(n, ""));
22
- break;
23
- case "istanbul":
24
- n.includes("istanbul") && (t = t.replaceAll(n, ""));
23
+ ["@legal", "@license"].some((c) => l.includes(c)) || (t = t.replace(l, ""));
25
24
  break;
26
25
  case "none":
27
26
  default:
28
- t = t.replaceAll(n, "");
27
+ t = t.replace(l, "");
29
28
  }
30
- return t;
29
+ return { code: t, map: null };
31
30
  }
32
31
  };
33
32
  };
34
33
  export {
35
- p as default
34
+ m as default
36
35
  };
37
36
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import { type Plugin } from \"vite\";\n\nexport type StripCommentsPlugin = Plugin & {\n name: string;\n enforce: \"pre\" | \"post\" | undefined;\n transform: (\n code: string,\n id?: string,\n ) => string;\n};\n\nexport type StripCommentsConfig = {\n type: \"none\" | \"keep-legal\" | \"istanbul\";\n enforce: \"pre\" | \"post\" | undefined;\n};\n\nconst StripCommentsDefaultConfig: StripCommentsConfig = {\n type: \"istanbul\",\n enforce: \"pre\",\n};\n\nconst stripComments = (cfg: Partial<StripCommentsConfig> = {}) => {\n const config: Partial<StripCommentsConfig> = {\n type:\n ([\"none\", \"keep-legal\", \"istanbul\"].some((x) => x === cfg.type)\n ? cfg.type\n : StripCommentsDefaultConfig.type) as StripCommentsConfig[\"type\"],\n enforce:\n ([\"pre\", \"post\"].some((x) => x === cfg.enforce)\n ? cfg.enforce\n : StripCommentsDefaultConfig.enforce) as StripCommentsConfig[\"enforce\"],\n };\n\n return {\n name: \"vite-plugin-strip-comments\",\n enforce: config.enforce,\n transform(code: string, id?: string) {\n /* istanbul ignore if @preserve */\n if (!id || id.includes(\"node_modules\")) return code;\n let result = code;\n let match: string;\n\n const matchesArray = Array.from(code.matchAll(\n /\\/\\*[\\s\\S]*?\\*\\/|\\/\\/.*/gm,\n ));\n\n for (let i = 0; i < matchesArray.length; i += 1) {\n // capture first match\n [match] = matchesArray[i];\n\n switch (config.type) {\n case \"keep-legal\":\n if (![\"@legal\", \"@license\"].some((x) => match.includes(x))) {\n result = result.replaceAll(match, \"\");\n }\n break;\n case \"istanbul\":\n if (match.includes(\"istanbul\")) {\n /* istanbul ignore next @preserve */\n result = result.replaceAll(match, \"\");\n }\n break;\n case \"none\":\n default:\n result = result.replaceAll(match, \"\");\n }\n }\n\n return result;\n },\n } satisfies StripCommentsPlugin;\n};\n\nexport default stripComments;\n"],"names":["StripCommentsDefaultConfig","stripComments","cfg","config","x","code","id","result","match","matchesArray","i"],"mappings":"AAgBA,MAAMA,IAAkD;AAAA,EACtD,MAAM;AAAA,EACN,SAAS;AACX,GAEMC,IAAgB,CAACC,IAAoC,OAAO;AAChE,QAAMC,IAAuC;AAAA,IAC3C,MACG,CAAC,QAAQ,cAAc,UAAU,EAAE,KAAK,CAACC,MAAMA,MAAMF,EAAI,IAAI,IAC1DA,EAAI,OACJF,EAA2B;AAAA,IACjC,SACG,CAAC,OAAO,MAAM,EAAE,KAAK,CAACI,MAAMA,MAAMF,EAAI,OAAO,IAC1CA,EAAI,UACJF,EAA2B;AAAA,EACnC;AAEO,SAAA;AAAA,IACL,MAAM;AAAA,IACN,SAASG,EAAO;AAAA,IAChB,UAAUE,GAAcC,GAAa;AAEnC,UAAI,CAACA,KAAMA,EAAG,SAAS,cAAc,EAAU,QAAAD;AAC/C,UAAIE,IAASF,GACTG;AAEE,YAAAC,IAAe,MAAM,KAAKJ,EAAK;AAAA,QACnC;AAAA,MAAA,CACD;AAED,eAASK,IAAI,GAAGA,IAAID,EAAa,QAAQC,KAAK;AAI5C,gBAFC,CAAAF,CAAK,IAAIC,EAAaC,CAAC,GAEhBP,EAAO,MAAM;AAAA,UACnB,KAAK;AACH,YAAK,CAAC,UAAU,UAAU,EAAE,KAAK,CAACC,MAAMI,EAAM,SAASJ,CAAC,CAAC,MAC9CG,IAAAA,EAAO,WAAWC,GAAO,EAAE;AAEtC;AAAA,UACF,KAAK;AACC,YAAAA,EAAM,SAAS,UAAU,MAElBD,IAAAA,EAAO,WAAWC,GAAO,EAAE;AAEtC;AAAA,UACF,KAAK;AAAA,UACL;AACW,YAAAD,IAAAA,EAAO,WAAWC,GAAO,EAAE;AAAA,QAAA;AAInC,aAAAD;AAAA,IAAA;AAAA,EAEX;AACF;"}
1
+ {"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import { type Plugin } from \"vite\";\n\nexport type StripCommentsPlugin = Plugin<StripCommentsConfig> & {\n name: string;\n enforce: \"pre\" | \"post\" | undefined;\n apply: \"build\";\n transform: (\n code: string,\n id?: string,\n ) => {\n code: string;\n map: string | null;\n };\n};\n\nexport type StripCommentsConfig = {\n type: \"none\" | \"keep-legal\";\n enforce: \"pre\" | \"post\" | undefined;\n};\n\nconst StripCommentsDefaultConfig: StripCommentsConfig = {\n type: \"keep-legal\",\n enforce: \"pre\",\n};\n\nconst stripComments = (cfg: Partial<StripCommentsConfig> = {}) => {\n const config: Partial<StripCommentsConfig> = {\n type:\n ([\"none\", \"keep-legal\"].some((x) => x === cfg.type)\n ? cfg.type\n : StripCommentsDefaultConfig.type) as StripCommentsConfig[\"type\"],\n enforce:\n ([\"pre\", \"post\"].some((x) => x === cfg.enforce)\n ? cfg.enforce\n : StripCommentsDefaultConfig.enforce) as StripCommentsConfig[\"enforce\"],\n };\n\n return {\n name: \"vite-plugin-strip-comments\",\n enforce: config.enforce,\n apply: \"build\",\n transform(code: string, id?: string): { code: string; map: null } {\n /* istanbul ignore if @preserve */\n if (!id || id.includes(\"node_modules\") || !/\\.([jt]sx?)$/.test(id)) {\n return { code, map: null };\n }\n let result = code;\n let match: string;\n\n const matchesArray = Array.from(code.matchAll(\n /\\/\\*[\\s\\S]*?\\*\\/|\\/\\*\\*.*?\\*\\/|\\/\\/.*(?=\\n)?/gm,\n ));\n\n for (let i = 0; i < matchesArray.length; i += 1) {\n // first match\n [match] = matchesArray[i];\n\n switch (config.type) {\n case \"keep-legal\":\n if (![\"@legal\", \"@license\"].some((x) => match.includes(x))) {\n result = result.replace(match, \"\");\n }\n break;\n case \"none\":\n default:\n result = result.replace(match, \"\");\n }\n }\n\n return { code: result, map: null };\n },\n } satisfies StripCommentsPlugin;\n};\n\nexport default stripComments;\n"],"names":["StripCommentsDefaultConfig","stripComments","cfg","config","x","code","id","result","match","matchesArray","i"],"mappings":"AAoBA,MAAMA,IAAkD;AAAA,EACtD,MAAM;AAAA,EACN,SAAS;AACX,GAEMC,IAAgB,CAACC,IAAoC,OAAO;AAChE,QAAMC,IAAuC;AAAA,IAC3C,MACG,CAAC,QAAQ,YAAY,EAAE,KAAK,CAACC,MAAMA,MAAMF,EAAI,IAAI,IAC9CA,EAAI,OACJF,EAA2B;AAAA,IACjC,SACG,CAAC,OAAO,MAAM,EAAE,KAAK,CAACI,MAAMA,MAAMF,EAAI,OAAO,IAC1CA,EAAI,UACJF,EAA2B;AAAA,EACnC;AAEO,SAAA;AAAA,IACL,MAAM;AAAA,IACN,SAASG,EAAO;AAAA,IAChB,OAAO;AAAA,IACP,UAAUE,GAAcC,GAA0C;AAE5D,UAAA,CAACA,KAAMA,EAAG,SAAS,cAAc,KAAK,CAAC,eAAe,KAAKA,CAAE;AACxD,eAAA,EAAE,MAAAD,GAAM,KAAK,KAAK;AAE3B,UAAIE,IAASF,GACTG;AAEE,YAAAC,IAAe,MAAM,KAAKJ,EAAK;AAAA,QACnC;AAAA,MAAA,CACD;AAED,eAASK,IAAI,GAAGA,IAAID,EAAa,QAAQC,KAAK;AAI5C,gBAFC,CAAAF,CAAK,IAAIC,EAAaC,CAAC,GAEhBP,EAAO,MAAM;AAAA,UACnB,KAAK;AACH,YAAK,CAAC,UAAU,UAAU,EAAE,KAAK,CAACC,MAAMI,EAAM,SAASJ,CAAC,CAAC,MAC9CG,IAAAA,EAAO,QAAQC,GAAO,EAAE;AAEnC;AAAA,UACF,KAAK;AAAA,UACL;AACW,YAAAD,IAAAA,EAAO,QAAQC,GAAO,EAAE;AAAA,QAAA;AAIvC,aAAO,EAAE,MAAMD,GAAQ,KAAK,KAAK;AAAA,IAAA;AAAA,EAErC;AACF;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-strip-comments",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "🗃️ Vite plugin for stripping comments in production builds",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "./dist/index.mjs",
@@ -28,9 +28,9 @@
28
28
  },
29
29
  "homepage": "https://github.com/thednp/vite-plugin-strip-comments#readme",
30
30
  "devDependencies": {
31
- "@types/node": "^20.17.6",
31
+ "@types/node": "^22.9.3",
32
32
  "@vitest/coverage-istanbul": "^2.1.5",
33
- "typescript": "^5.6.3",
33
+ "typescript": "^5.7.2",
34
34
  "vite": "^5.4.11",
35
35
  "vite-plugin-dts": "^4.3.0",
36
36
  "vitest": "^2.1.5"