@devup-ui/webpack-plugin 1.0.10 → 1.0.11

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/dist/loader.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("node:fs/promises"),o=require("node:path"),s=require("@devup-ui/wasm"),_=function(l){const{watch:a,package:n,cssFile:i,sheetFile:u,classMapFile:h}=this.getOptions(),t=this.async(),p=this.resourcePath;try{const{code:e,css:d}=s.codeExtract(p,l.toString(),n,o.relative(o.dirname(this.resourcePath),i).replaceAll("\\","/"));if(d&&a){const c=`${this.resourcePath} ${Date.now()}`;this._compiler&&(this._compiler.__DEVUP_CACHE=c),Promise.all([r.writeFile(i,`/* ${c} */`),r.writeFile(u,s.exportSheet()),r.writeFile(h,s.exportClassMap())]).catch(console.error).finally(()=>t(null,e));return}t(null,e)}catch(e){t(e)}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("node:fs/promises"),a=require("node:path"),s=require("@devup-ui/wasm"),_=function(l){const{watch:n,package:u,cssFile:i,sheetFile:h,classMapFile:p}=this.getOptions(),t=this.async(),d=this.resourcePath;try{const{code:e,css:m,map:c}=s.codeExtract(d,l.toString(),u,a.relative(a.dirname(this.resourcePath),i).replaceAll("\\","/"));if(m&&n){const o=`${this.resourcePath} ${Date.now()}`;this._compiler&&(this._compiler.__DEVUP_CACHE=o),Promise.all([r.writeFile(i,`/* ${o} */`),r.writeFile(h,s.exportSheet()),r.writeFile(p,s.exportClassMap())]).catch(console.error).finally(()=>t(null,e,c));return}t(null,e,c)}catch(e){t(e)}};exports.default=_;
package/dist/loader.js CHANGED
@@ -1,35 +1,35 @@
1
1
  import { writeFile as r } from "node:fs/promises";
2
- import { relative as m, dirname as u } from "node:path";
3
- import { codeExtract as f, exportSheet as d, exportClassMap as P } from "@devup-ui/wasm";
4
- const F = function(s) {
2
+ import { relative as u, dirname as f } from "node:path";
3
+ import { codeExtract as d, exportSheet as P, exportClassMap as _ } from "@devup-ui/wasm";
4
+ const k = function(a) {
5
5
  const {
6
6
  watch: i,
7
- package: a,
7
+ package: l,
8
8
  cssFile: o,
9
- sheetFile: l,
10
- classMapFile: n
11
- } = this.getOptions(), e = this.async(), h = this.resourcePath;
9
+ sheetFile: n,
10
+ classMapFile: h
11
+ } = this.getOptions(), e = this.async(), p = this.resourcePath;
12
12
  try {
13
- const { code: t, css: p } = f(
14
- h,
15
- s.toString(),
16
- a,
17
- m(u(this.resourcePath), o).replaceAll("\\", "/")
13
+ const { code: t, css: m, map: c } = d(
14
+ p,
15
+ a.toString(),
16
+ l,
17
+ u(f(this.resourcePath), o).replaceAll("\\", "/")
18
18
  );
19
- if (p && i) {
20
- const c = `${this.resourcePath} ${Date.now()}`;
21
- this._compiler && (this._compiler.__DEVUP_CACHE = c), Promise.all([
22
- r(o, `/* ${c} */`),
23
- r(l, d()),
24
- r(n, P())
25
- ]).catch(console.error).finally(() => e(null, t));
19
+ if (m && i) {
20
+ const s = `${this.resourcePath} ${Date.now()}`;
21
+ this._compiler && (this._compiler.__DEVUP_CACHE = s), Promise.all([
22
+ r(o, `/* ${s} */`),
23
+ r(n, P()),
24
+ r(h, _())
25
+ ]).catch(console.error).finally(() => e(null, t, c));
26
26
  return;
27
27
  }
28
- e(null, t);
28
+ e(null, t, c);
29
29
  } catch (t) {
30
30
  e(t);
31
31
  }
32
32
  };
33
33
  export {
34
- F as default
34
+ k as default
35
35
  };
package/package.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "webpack"
19
19
  ],
20
20
  "type": "module",
21
- "version": "1.0.10",
21
+ "version": "1.0.11",
22
22
  "publishConfig": {
23
23
  "access": "public"
24
24
  },
@@ -45,7 +45,7 @@
45
45
  "dist"
46
46
  ],
47
47
  "dependencies": {
48
- "@devup-ui/wasm": "1.0.10"
48
+ "@devup-ui/wasm": "1.0.11"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@devup-ui/wasm": "*"