weapp-tailwindcss 4.2.0 → 4.2.1-alpha.1

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.
@@ -63,7 +63,12 @@ function transformUVue(code, id, jsHandler, runtimeSet) {
63
63
  ms.update(descriptor.scriptSetup.loc.start.offset, descriptor.scriptSetup.loc.end.offset, code2);
64
64
  }
65
65
  }
66
- return ms.toString();
66
+ return {
67
+ code: ms.toString(),
68
+ get map() {
69
+ return ms.generateMap();
70
+ }
71
+ };
67
72
  }
68
73
 
69
74
  // src/bundlers/vite/index.ts
@@ -295,7 +300,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
295
300
  if (uniAppX) {
296
301
  plugins.push(
297
302
  {
298
- name: "weapp-tailwindcss:uni-app-x:css",
303
+ name: "weapp-tailwindcss:uni-app-x:css:pre",
299
304
  enforce: "pre",
300
305
  async transform(code, id) {
301
306
  if (isCSSRequest(id)) {
@@ -315,6 +320,27 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
315
320
  }
316
321
  }
317
322
  );
323
+ plugins.push(
324
+ {
325
+ name: "weapp-tailwindcss:uni-app-x:css",
326
+ async transform(code, id) {
327
+ if (isCSSRequest(id)) {
328
+ const { css } = await styleHandler(code, {
329
+ isMainChunk: mainCssChunkMatcher(id, appType),
330
+ postcssOptions: {
331
+ options: {
332
+ from: id
333
+ }
334
+ }
335
+ });
336
+ return {
337
+ code: css
338
+ // map,
339
+ };
340
+ }
341
+ }
342
+ }
343
+ );
318
344
  plugins.push(
319
345
  {
320
346
  name: "weapp-tailwindcss:uni-app-x:nvue",
@@ -63,7 +63,12 @@ function transformUVue(code, id, jsHandler, runtimeSet) {
63
63
  ms.update(descriptor.scriptSetup.loc.start.offset, descriptor.scriptSetup.loc.end.offset, code2);
64
64
  }
65
65
  }
66
- return ms.toString();
66
+ return {
67
+ code: ms.toString(),
68
+ get map() {
69
+ return ms.generateMap();
70
+ }
71
+ };
67
72
  }
68
73
 
69
74
  // src/bundlers/vite/index.ts
@@ -295,7 +300,7 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
295
300
  if (uniAppX) {
296
301
  plugins.push(
297
302
  {
298
- name: "weapp-tailwindcss:uni-app-x:css",
303
+ name: "weapp-tailwindcss:uni-app-x:css:pre",
299
304
  enforce: "pre",
300
305
  async transform(code, id) {
301
306
  if (isCSSRequest(id)) {
@@ -315,6 +320,27 @@ function UnifiedViteWeappTailwindcssPlugin(options = {}) {
315
320
  }
316
321
  }
317
322
  );
323
+ plugins.push(
324
+ {
325
+ name: "weapp-tailwindcss:uni-app-x:css",
326
+ async transform(code, id) {
327
+ if (isCSSRequest(id)) {
328
+ const { css } = await styleHandler(code, {
329
+ isMainChunk: mainCssChunkMatcher(id, appType),
330
+ postcssOptions: {
331
+ options: {
332
+ from: id
333
+ }
334
+ }
335
+ });
336
+ return {
337
+ code: css
338
+ // map,
339
+ };
340
+ }
341
+ }
342
+ }
343
+ );
318
344
  plugins.push(
319
345
  {
320
346
  name: "weapp-tailwindcss:uni-app-x:nvue",
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ var _chunkXPJSMUIZjs = require('./chunk-XPJSMUIZ.js');
9
9
 
10
10
 
11
11
 
12
- var _chunkIMVEMC3Fjs = require('./chunk-IMVEMC3F.js');
12
+ var _chunkOWW6JRG7js = require('./chunk-OWW6JRG7.js');
13
13
  require('./chunk-LSSLYD6B.js');
14
14
  require('./chunk-OGROHM4L.js');
15
15
  require('./chunk-PLEG4SRN.js');
@@ -23,4 +23,4 @@ require('./chunk-U5U4QBHD.js');
23
23
 
24
24
 
25
25
 
26
- exports.UnifiedViteWeappTailwindcssPlugin = _chunkIMVEMC3Fjs.UnifiedViteWeappTailwindcssPlugin; exports.UnifiedWebpackPluginV5 = _chunkZK5OYQKNjs.UnifiedWebpackPluginV5; exports.createPlugins = _chunkXPJSMUIZjs.createPlugins; exports.cssLangRE = _chunkIMVEMC3Fjs.cssLangRE; exports.isCSSRequest = _chunkIMVEMC3Fjs.isCSSRequest;
26
+ exports.UnifiedViteWeappTailwindcssPlugin = _chunkOWW6JRG7js.UnifiedViteWeappTailwindcssPlugin; exports.UnifiedWebpackPluginV5 = _chunkZK5OYQKNjs.UnifiedWebpackPluginV5; exports.createPlugins = _chunkXPJSMUIZjs.createPlugins; exports.cssLangRE = _chunkOWW6JRG7js.cssLangRE; exports.isCSSRequest = _chunkOWW6JRG7js.isCSSRequest;
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  UnifiedViteWeappTailwindcssPlugin,
10
10
  cssLangRE,
11
11
  isCSSRequest
12
- } from "./chunk-6MYPLP7F.mjs";
12
+ } from "./chunk-RDXEPOXU.mjs";
13
13
  import "./chunk-3AUX4FGE.mjs";
14
14
  import "./chunk-CMUA5KCO.mjs";
15
15
  import "./chunk-FOPIY67W.mjs";
package/dist/vite.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkIMVEMC3Fjs = require('./chunk-IMVEMC3F.js');
5
+ var _chunkOWW6JRG7js = require('./chunk-OWW6JRG7.js');
6
6
  require('./chunk-LSSLYD6B.js');
7
7
  require('./chunk-OGROHM4L.js');
8
8
  require('./chunk-PLEG4SRN.js');
@@ -14,4 +14,4 @@ require('./chunk-U5U4QBHD.js');
14
14
 
15
15
 
16
16
 
17
- exports.UnifiedViteWeappTailwindcssPlugin = _chunkIMVEMC3Fjs.UnifiedViteWeappTailwindcssPlugin; exports.cssLangRE = _chunkIMVEMC3Fjs.cssLangRE; exports.isCSSRequest = _chunkIMVEMC3Fjs.isCSSRequest;
17
+ exports.UnifiedViteWeappTailwindcssPlugin = _chunkOWW6JRG7js.UnifiedViteWeappTailwindcssPlugin; exports.cssLangRE = _chunkOWW6JRG7js.cssLangRE; exports.isCSSRequest = _chunkOWW6JRG7js.isCSSRequest;
package/dist/vite.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  UnifiedViteWeappTailwindcssPlugin,
3
3
  cssLangRE,
4
4
  isCSSRequest
5
- } from "./chunk-6MYPLP7F.mjs";
5
+ } from "./chunk-RDXEPOXU.mjs";
6
6
  import "./chunk-3AUX4FGE.mjs";
7
7
  import "./chunk-CMUA5KCO.mjs";
8
8
  import "./chunk-FOPIY67W.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weapp-tailwindcss",
3
- "version": "4.2.0",
3
+ "version": "4.2.1-alpha.1",
4
4
  "description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
5
5
  "author": "ice breaker <1324318532@qq.com>",
6
6
  "license": "MIT",