unplugin-tailwindcss-mangle 4.1.2 → 5.1.0

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 @@ mangle tailwindcss utilities plugin
4
4
 
5
5
  It is recommended to read the documentation of [tailwindcss-patch](https://github.com/sonofmagic/tailwindcss-mangle/tree/main/packages/tailwindcss-patch) first, `unplugin-tailwindcss-mangle` depends on this tool.
6
6
 
7
- > Now Support `vite` and `webpack`
7
+ > Now Support `vite`, `webpack`, `esbuild`, and `nuxt`
8
8
 
9
9
  - [unplugin-tailwindcss-mangle](#unplugin-tailwindcss-mangle)
10
10
  - [Docs](#docs)
@@ -17,6 +17,7 @@ It is recommended to read the documentation of [tailwindcss-patch](https://githu
17
17
  - [5. Register this plugin](#5-register-this-plugin)
18
18
  - [vite](#vite)
19
19
  - [webpack](#webpack)
20
+ - [esbuild](#esbuild)
20
21
  - [Nuxt 3](#nuxt-3)
21
22
  - [Options](#options)
22
23
  - [Notice](#notice)
@@ -52,9 +53,11 @@ npx tw-patch install
52
53
  ### 3. add `prepare` script in your `package.json`
53
54
 
54
55
  ```json
56
+ {
55
57
  "scripts": {
56
58
  "prepare": "tw-patch install"
57
- },
59
+ }
60
+ }
58
61
  ```
59
62
 
60
63
  ### 4. Run extract command
@@ -101,9 +104,10 @@ You will see all class was renamed to `tw-*`
101
104
  // esm
102
105
  import { webpackPlugin as utwm } from 'unplugin-tailwindcss-mangle'
103
106
  // or cjs
104
- const utwm = require('unplugin-tailwindcss-mangle/webpack')
107
+ // const utwm = require('unplugin-tailwindcss-mangle/webpack')
105
108
  // use this webpack plugin
106
109
  // for example next.config.js
110
+ // eslint-disable-next-line perfectionist/sort-imports
107
111
  const { defineConfig } = require('@vue/cli-service')
108
112
  // vue.config.js
109
113
  module.exports = defineConfig({
@@ -114,13 +118,27 @@ module.exports = defineConfig({
114
118
  }
115
119
  }
116
120
  })
121
+ ```
122
+
123
+ #### esbuild
117
124
 
125
+ ```js
126
+ import { build } from 'esbuild'
127
+ import utwm from 'unplugin-tailwindcss-mangle/esbuild'
128
+
129
+ await build({
130
+ entryPoints: ['src/main.ts'],
131
+ bundle: true,
132
+ outfile: 'dist/index.js',
133
+ plugins: [utwm()]
134
+ })
118
135
  ```
119
136
 
120
137
  #### Nuxt 3
121
138
 
122
139
  ```ts
123
140
  import nuxtPlugin from 'unplugin-tailwindcss-mangle/nuxt'
141
+
124
142
  export default defineNuxtConfig({
125
143
  // ...
126
144
  // https://github.com/nuxt/nuxt/issues/20428
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
4
 
5
- var _chunkBZZ6FFT4cjs = require('./chunk-BZZ6FFT4.cjs');
5
+ var _chunkQGD6AWGRcjs = require('./chunk-QGD6AWGR.cjs');
6
6
 
7
7
  // src/core/plugin.ts
8
8
  var _unplugin = require('unplugin');
@@ -11,23 +11,22 @@ var _unplugin = require('unplugin');
11
11
  var _pluginutils = require('@rollup/pluginutils');
12
12
  var _core = require('@tailwindcss-mangle/core');
13
13
  var _iscssrequest = require('is-css-request');
14
- var WEBPACK_LOADER = _chunkBZZ6FFT4cjs.posix.resolve(__dirname, false ? "../../dist/loader.cjs" : "./loader.cjs");
14
+ var WEBPACK_LOADER = _chunkQGD6AWGRcjs.posix.resolve(__dirname, false ? "../../dist/loader.cjs" : "./loader.cjs");
15
15
  var factory = (options) => {
16
16
  const ctx = new (0, _core.Context)();
17
17
  let filter = (_id) => true;
18
18
  return [
19
19
  {
20
- name: `${_chunkBZZ6FFT4cjs.pluginName}:pre`,
20
+ name: `${_chunkQGD6AWGRcjs.pluginName}:pre`,
21
21
  enforce: "pre",
22
22
  async buildStart() {
23
- await ctx.initConfig({
24
- mangleOptions: options
25
- });
26
- filter = _pluginutils.createFilter.call(void 0, ctx.options.include, ctx.options.exclude);
23
+ const initOptions = options === void 0 ? {} : { transformerOptions: options };
24
+ await ctx.initConfig(initOptions);
25
+ filter = _pluginutils.createFilter.call(void 0, _optionalChain([ctx, 'access', _ => _.options, 'access', _2 => _2.sources, 'optionalAccess', _3 => _3.include]), _optionalChain([ctx, 'access', _4 => _4.options, 'access', _5 => _5.sources, 'optionalAccess', _6 => _6.exclude]));
27
26
  }
28
27
  },
29
28
  {
30
- name: `${_chunkBZZ6FFT4cjs.pluginName}`,
29
+ name: `${_chunkQGD6AWGRcjs.pluginName}`,
31
30
  transformInclude(id) {
32
31
  return filter(id);
33
32
  },
@@ -36,13 +35,19 @@ var factory = (options) => {
36
35
  ctx,
37
36
  id
38
37
  };
39
- if (/\.[jt]sx?(?:$|\?)/.test(id)) {
38
+ if (/\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
40
39
  return _core.jsHandler.call(void 0, code, opts);
41
- } else if (/\.(?:vue|svelte)(?:$|\?)/.test(id)) {
40
+ } else if (/\.vue(?:$|\?)/.test(id)) {
41
+ if (_iscssrequest.isCSSRequest.call(void 0, id)) {
42
+ return await _core.cssHandler.call(void 0, code, opts);
43
+ } else {
44
+ return await _core.vueHandler.call(void 0, code, opts);
45
+ }
46
+ } else if (/\.svelte(?:$|\?)/.test(id)) {
42
47
  if (_iscssrequest.isCSSRequest.call(void 0, id)) {
43
48
  return await _core.cssHandler.call(void 0, code, opts);
44
49
  } else {
45
- return _core.jsHandler.call(void 0, code, opts);
50
+ return await _core.svelteHandler.call(void 0, code, opts);
46
51
  }
47
52
  } else if (_iscssrequest.isCSSRequest.call(void 0, id)) {
48
53
  return await _core.cssHandler.call(void 0, code, opts);
@@ -53,8 +58,8 @@ var factory = (options) => {
53
58
  webpack(compiler) {
54
59
  const { NormalModule } = compiler.webpack;
55
60
  const isExisted = true;
56
- compiler.hooks.compilation.tap(_chunkBZZ6FFT4cjs.pluginName, (compilation) => {
57
- NormalModule.getCompilationHooks(compilation).loader.tap(_chunkBZZ6FFT4cjs.pluginName, (_loaderContext, module) => {
61
+ compiler.hooks.compilation.tap(_chunkQGD6AWGRcjs.pluginName, (compilation) => {
62
+ NormalModule.getCompilationHooks(compilation).loader.tap(_chunkQGD6AWGRcjs.pluginName, (_loaderContext, module) => {
58
63
  if (isExisted) {
59
64
  const idx = module.loaders.findIndex((x) => x.loader.includes("postcss-loader"));
60
65
  if (idx > -1) {
@@ -73,7 +78,7 @@ var factory = (options) => {
73
78
  }
74
79
  },
75
80
  {
76
- name: `${_chunkBZZ6FFT4cjs.pluginName}:post`,
81
+ name: `${_chunkQGD6AWGRcjs.pluginName}:post`,
77
82
  enforce: "post",
78
83
  vite: {
79
84
  transformIndexHtml(html) {
@@ -99,17 +104,21 @@ var factory = (options) => {
99
104
  webpack(compiler) {
100
105
  const { Compilation, sources } = compiler.webpack;
101
106
  const { ConcatSource } = sources;
102
- compiler.hooks.compilation.tap(_chunkBZZ6FFT4cjs.pluginName, (compilation) => {
107
+ compiler.hooks.compilation.tap(_chunkQGD6AWGRcjs.pluginName, (compilation) => {
103
108
  compilation.hooks.processAssets.tapPromise(
104
109
  {
105
- name: _chunkBZZ6FFT4cjs.pluginName,
110
+ name: _chunkQGD6AWGRcjs.pluginName,
106
111
  stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE
107
112
  },
108
113
  async (assets) => {
109
- const groupedEntries = _chunkBZZ6FFT4cjs.getGroupedEntries.call(void 0, Object.entries(assets));
114
+ const groupedEntries = _chunkQGD6AWGRcjs.getGroupedEntries.call(void 0, Object.entries(assets));
110
115
  if (groupedEntries.css.length > 0) {
111
116
  for (let i = 0; i < groupedEntries.css.length; i++) {
112
- const [id, cssSource] = groupedEntries.css[i];
117
+ const entry = groupedEntries.css[i];
118
+ if (!entry) {
119
+ continue;
120
+ }
121
+ const [id, cssSource] = entry;
113
122
  const { code } = await _core.cssHandler.call(void 0, cssSource.source().toString(), {
114
123
  id,
115
124
  ctx
@@ -2,17 +2,17 @@ import {
2
2
  getGroupedEntries,
3
3
  pluginName,
4
4
  posix
5
- } from "./chunk-WVLLWHGJ.js";
5
+ } from "./chunk-TVEX3BIF.js";
6
6
  import {
7
7
  __dirname
8
- } from "./chunk-GDFDW6UC.js";
8
+ } from "./chunk-YMEGC4U6.js";
9
9
 
10
10
  // src/core/plugin.ts
11
11
  import { createUnplugin } from "unplugin";
12
12
 
13
13
  // src/core/factory.ts
14
14
  import { createFilter } from "@rollup/pluginutils";
15
- import { Context, cssHandler, htmlHandler, jsHandler } from "@tailwindcss-mangle/core";
15
+ import { Context, cssHandler, htmlHandler, jsHandler, vueHandler, svelteHandler } from "@tailwindcss-mangle/core";
16
16
  import { isCSSRequest } from "is-css-request";
17
17
  var WEBPACK_LOADER = posix.resolve(__dirname, false ? "../../dist/loader.cjs" : "./loader.cjs");
18
18
  var factory = (options) => {
@@ -23,10 +23,9 @@ var factory = (options) => {
23
23
  name: `${pluginName}:pre`,
24
24
  enforce: "pre",
25
25
  async buildStart() {
26
- await ctx.initConfig({
27
- mangleOptions: options
28
- });
29
- filter = createFilter(ctx.options.include, ctx.options.exclude);
26
+ const initOptions = options === void 0 ? {} : { transformerOptions: options };
27
+ await ctx.initConfig(initOptions);
28
+ filter = createFilter(ctx.options.sources?.include, ctx.options.sources?.exclude);
30
29
  }
31
30
  },
32
31
  {
@@ -39,13 +38,19 @@ var factory = (options) => {
39
38
  ctx,
40
39
  id
41
40
  };
42
- if (/\.[jt]sx?(?:$|\?)/.test(id)) {
41
+ if (/\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
43
42
  return jsHandler(code, opts);
44
- } else if (/\.(?:vue|svelte)(?:$|\?)/.test(id)) {
43
+ } else if (/\.vue(?:$|\?)/.test(id)) {
44
+ if (isCSSRequest(id)) {
45
+ return await cssHandler(code, opts);
46
+ } else {
47
+ return await vueHandler(code, opts);
48
+ }
49
+ } else if (/\.svelte(?:$|\?)/.test(id)) {
45
50
  if (isCSSRequest(id)) {
46
51
  return await cssHandler(code, opts);
47
52
  } else {
48
- return jsHandler(code, opts);
53
+ return await svelteHandler(code, opts);
49
54
  }
50
55
  } else if (isCSSRequest(id)) {
51
56
  return await cssHandler(code, opts);
@@ -112,7 +117,11 @@ var factory = (options) => {
112
117
  const groupedEntries = getGroupedEntries(Object.entries(assets));
113
118
  if (groupedEntries.css.length > 0) {
114
119
  for (let i = 0; i < groupedEntries.css.length; i++) {
115
- const [id, cssSource] = groupedEntries.css[i];
120
+ const entry = groupedEntries.css[i];
121
+ if (!entry) {
122
+ continue;
123
+ }
124
+ const [id, cssSource] = entry;
116
125
  const { code } = await cssHandler(cssSource.source().toString(), {
117
126
  id,
118
127
  ctx
@@ -455,17 +455,17 @@ function getGroupedEntries(entries, options = {
455
455
  return "other";
456
456
  }
457
457
  });
458
- if (!groupedEntries.css) {
459
- groupedEntries.css = [];
458
+ if (!groupedEntries["css"]) {
459
+ groupedEntries["css"] = [];
460
460
  }
461
- if (!groupedEntries.html) {
462
- groupedEntries.html = [];
461
+ if (!groupedEntries["html"]) {
462
+ groupedEntries["html"] = [];
463
463
  }
464
- if (!groupedEntries.js) {
465
- groupedEntries.js = [];
464
+ if (!groupedEntries["js"]) {
465
+ groupedEntries["js"] = [];
466
466
  }
467
- if (!groupedEntries.other) {
468
- groupedEntries.other = [];
467
+ if (!groupedEntries["other"]) {
468
+ groupedEntries["other"] = [];
469
469
  }
470
470
  return groupedEntries;
471
471
  }
@@ -455,17 +455,17 @@ function getGroupedEntries(entries, options = {
455
455
  return "other";
456
456
  }
457
457
  });
458
- if (!groupedEntries.css) {
459
- groupedEntries.css = [];
458
+ if (!groupedEntries["css"]) {
459
+ groupedEntries["css"] = [];
460
460
  }
461
- if (!groupedEntries.html) {
462
- groupedEntries.html = [];
461
+ if (!groupedEntries["html"]) {
462
+ groupedEntries["html"] = [];
463
463
  }
464
- if (!groupedEntries.js) {
465
- groupedEntries.js = [];
464
+ if (!groupedEntries["js"]) {
465
+ groupedEntries["js"] = [];
466
466
  }
467
- if (!groupedEntries.other) {
468
- groupedEntries.other = [];
467
+ if (!groupedEntries["other"]) {
468
+ groupedEntries["other"] = [];
469
469
  }
470
470
  return groupedEntries;
471
471
  }
@@ -1,4 +1,4 @@
1
- // ../../node_modules/.pnpm/tsup@8.5.0_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_typescript@5.8.3_yaml@2.8.0/node_modules/tsup/assets/esm_shims.js
1
+ // ../../node_modules/.pnpm/tsup@8.5.1_jiti@2.6.1_postcss@8.5.6_tsx@4.21.0_typescript@5.9.3_yaml@2.8.2/node_modules/tsup/assets/esm_shims.js
2
2
  import path from "path";
3
3
  import { fileURLToPath } from "url";
4
4
  var getFilename = () => fileURLToPath(import.meta.url);
package/dist/esbuild.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkE66B4GJ5cjs = require('./chunk-E66B4GJ5.cjs');
4
- require('./chunk-BZZ6FFT4.cjs');
3
+ var _chunk4GIK4Z2Jcjs = require('./chunk-4GIK4Z2J.cjs');
4
+ require('./chunk-QGD6AWGR.cjs');
5
5
 
6
6
  // src/esbuild.ts
7
- var esbuild_default = _chunkE66B4GJ5cjs.plugin_default.esbuild;
7
+ var esbuild_default = _chunk4GIK4Z2Jcjs.plugin_default.esbuild;
8
8
 
9
9
 
10
10
  exports.default = esbuild_default;
@@ -1,6 +1,6 @@
1
1
  import * as esbuild from 'esbuild';
2
2
  import * as _tailwindcss_mangle_config from '@tailwindcss-mangle/config';
3
3
 
4
- declare const _default: (options?: _tailwindcss_mangle_config.MangleUserConfig | undefined) => esbuild.Plugin;
4
+ declare const _default: (options?: _tailwindcss_mangle_config.TransformerOptions | undefined) => esbuild.Plugin;
5
5
 
6
6
  export = _default;
package/dist/esbuild.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as esbuild from 'esbuild';
2
2
  import * as _tailwindcss_mangle_config from '@tailwindcss-mangle/config';
3
3
 
4
- declare const _default: (options?: _tailwindcss_mangle_config.MangleUserConfig | undefined) => esbuild.Plugin;
4
+ declare const _default: (options?: _tailwindcss_mangle_config.TransformerOptions | undefined) => esbuild.Plugin;
5
5
 
6
6
  export { _default as default };
package/dist/esbuild.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  plugin_default
3
- } from "./chunk-SCY3O2DD.js";
4
- import "./chunk-WVLLWHGJ.js";
5
- import "./chunk-GDFDW6UC.js";
3
+ } from "./chunk-5RVUE77A.js";
4
+ import "./chunk-TVEX3BIF.js";
5
+ import "./chunk-YMEGC4U6.js";
6
6
 
7
7
  // src/esbuild.ts
8
8
  var esbuild_default = plugin_default.esbuild;
package/dist/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkE66B4GJ5cjs = require('./chunk-E66B4GJ5.cjs');
4
- require('./chunk-BZZ6FFT4.cjs');
3
+ var _chunk4GIK4Z2Jcjs = require('./chunk-4GIK4Z2J.cjs');
4
+ require('./chunk-QGD6AWGR.cjs');
5
5
 
6
6
 
7
- exports.default = _chunkE66B4GJ5cjs.plugin_default;
7
+ exports.default = _chunk4GIK4Z2Jcjs.plugin_default;
8
8
 
9
9
  module.exports = exports.default;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _unplugin from 'unplugin';
2
2
  import * as _tailwindcss_mangle_config from '@tailwindcss-mangle/config';
3
3
 
4
- declare const unplugin: _unplugin.UnpluginInstance<_tailwindcss_mangle_config.MangleUserConfig | undefined, boolean>;
4
+ declare const unplugin: _unplugin.UnpluginInstance<_tailwindcss_mangle_config.TransformerOptions | undefined, boolean>;
5
5
 
6
6
  export = unplugin;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _unplugin from 'unplugin';
2
2
  import * as _tailwindcss_mangle_config from '@tailwindcss-mangle/config';
3
3
 
4
- declare const unplugin: _unplugin.UnpluginInstance<_tailwindcss_mangle_config.MangleUserConfig | undefined, boolean>;
4
+ declare const unplugin: _unplugin.UnpluginInstance<_tailwindcss_mangle_config.TransformerOptions | undefined, boolean>;
5
5
 
6
6
  export { unplugin as default };
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  plugin_default
3
- } from "./chunk-SCY3O2DD.js";
4
- import "./chunk-WVLLWHGJ.js";
5
- import "./chunk-GDFDW6UC.js";
3
+ } from "./chunk-5RVUE77A.js";
4
+ import "./chunk-TVEX3BIF.js";
5
+ import "./chunk-YMEGC4U6.js";
6
6
  export {
7
7
  plugin_default as default
8
8
  };
package/dist/loader.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/loader.ts
2
2
  var _core = require('@tailwindcss-mangle/core');
3
- var TailwindcssMangleWebpackLoader = async function(source) {
3
+ async function TailwindcssMangleWebpackLoader(source) {
4
4
  const callback = this.async();
5
5
  const { ctx } = this.getOptions();
6
6
  const { code } = await _core.cssHandler.call(void 0, source, {
@@ -8,7 +8,7 @@ var TailwindcssMangleWebpackLoader = async function(source) {
8
8
  id: this.resource
9
9
  });
10
10
  callback(null, code);
11
- };
11
+ }
12
12
  var loader_default = TailwindcssMangleWebpackLoader;
13
13
 
14
14
 
package/dist/loader.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Context } from '@tailwindcss-mangle/core';
2
2
  import { LoaderContext } from 'webpack';
3
3
 
4
- declare const TailwindcssMangleWebpackLoader: (this: LoaderContext<{
4
+ declare function TailwindcssMangleWebpackLoader(this: LoaderContext<{
5
5
  ctx: Context;
6
- }>, source: string) => Promise<void>;
6
+ }>, source: string): Promise<void>;
7
7
 
8
8
  export = TailwindcssMangleWebpackLoader;
package/dist/loader.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { Context } from '@tailwindcss-mangle/core';
2
2
  import { LoaderContext } from 'webpack';
3
3
 
4
- declare const TailwindcssMangleWebpackLoader: (this: LoaderContext<{
4
+ declare function TailwindcssMangleWebpackLoader(this: LoaderContext<{
5
5
  ctx: Context;
6
- }>, source: string) => Promise<void>;
6
+ }>, source: string): Promise<void>;
7
7
 
8
8
  export { TailwindcssMangleWebpackLoader as default };
package/dist/loader.js CHANGED
@@ -1,8 +1,8 @@
1
- import "./chunk-GDFDW6UC.js";
1
+ import "./chunk-YMEGC4U6.js";
2
2
 
3
3
  // src/loader.ts
4
4
  import { cssHandler } from "@tailwindcss-mangle/core";
5
- var TailwindcssMangleWebpackLoader = async function(source) {
5
+ async function TailwindcssMangleWebpackLoader(source) {
6
6
  const callback = this.async();
7
7
  const { ctx } = this.getOptions();
8
8
  const { code } = await cssHandler(source, {
@@ -10,7 +10,7 @@ var TailwindcssMangleWebpackLoader = async function(source) {
10
10
  id: this.resource
11
11
  });
12
12
  callback(null, code);
13
- };
13
+ }
14
14
  var loader_default = TailwindcssMangleWebpackLoader;
15
15
  export {
16
16
  loader_default as default
package/dist/nuxt.cjs CHANGED
@@ -1,17 +1,17 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkE66B4GJ5cjs = require('./chunk-E66B4GJ5.cjs');
4
- require('./chunk-BZZ6FFT4.cjs');
3
+ var _chunk4GIK4Z2Jcjs = require('./chunk-4GIK4Z2J.cjs');
4
+ require('./chunk-QGD6AWGR.cjs');
5
5
 
6
6
  // src/nuxt.ts
7
7
  function nuxt_default(options = {}, nuxt) {
8
8
  nuxt.hook("webpack:config", (config) => {
9
9
  config.plugins = config.plugins || [];
10
- config.plugins.unshift(_chunkE66B4GJ5cjs.plugin_default.webpack(options));
10
+ config.plugins.unshift(_chunk4GIK4Z2Jcjs.plugin_default.webpack(options));
11
11
  });
12
12
  nuxt.hook("vite:extendConfig", (config) => {
13
13
  config.plugins = config.plugins || [];
14
- config.plugins.push(_chunkE66B4GJ5cjs.plugin_default.vite(options));
14
+ config.plugins.push(_chunk4GIK4Z2Jcjs.plugin_default.vite(options));
15
15
  });
16
16
  }
17
17
 
package/dist/nuxt.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { MangleUserConfig } from '@tailwindcss-mangle/config';
1
+ import { TransformerOptions } from '@tailwindcss-mangle/config';
2
2
 
3
- declare function export_default(options: MangleUserConfig | undefined, nuxt: any): void;
3
+ declare function export_default(options: TransformerOptions | undefined, nuxt: any): void;
4
4
 
5
5
  export = export_default;
package/dist/nuxt.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { MangleUserConfig } from '@tailwindcss-mangle/config';
1
+ import { TransformerOptions } from '@tailwindcss-mangle/config';
2
2
 
3
- declare function export_default(options: MangleUserConfig | undefined, nuxt: any): void;
3
+ declare function export_default(options: TransformerOptions | undefined, nuxt: any): void;
4
4
 
5
5
  export { export_default as default };
package/dist/nuxt.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  plugin_default
3
- } from "./chunk-SCY3O2DD.js";
4
- import "./chunk-WVLLWHGJ.js";
5
- import "./chunk-GDFDW6UC.js";
3
+ } from "./chunk-5RVUE77A.js";
4
+ import "./chunk-TVEX3BIF.js";
5
+ import "./chunk-YMEGC4U6.js";
6
6
 
7
7
  // src/nuxt.ts
8
8
  function nuxt_default(options = {}, nuxt) {
package/dist/rollup.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkE66B4GJ5cjs = require('./chunk-E66B4GJ5.cjs');
4
- require('./chunk-BZZ6FFT4.cjs');
3
+ var _chunk4GIK4Z2Jcjs = require('./chunk-4GIK4Z2J.cjs');
4
+ require('./chunk-QGD6AWGR.cjs');
5
5
 
6
6
  // src/rollup.ts
7
- var rollup_default = _chunkE66B4GJ5cjs.plugin_default.rollup;
7
+ var rollup_default = _chunk4GIK4Z2Jcjs.plugin_default.rollup;
8
8
 
9
9
 
10
10
  exports.default = rollup_default;
package/dist/rollup.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as rollup from 'rollup';
2
2
  import * as _tailwindcss_mangle_config from '@tailwindcss-mangle/config';
3
3
 
4
- declare const _default: (options?: _tailwindcss_mangle_config.MangleUserConfig | undefined) => rollup.Plugin<any> | rollup.Plugin<any>[];
4
+ declare const _default: (options?: _tailwindcss_mangle_config.TransformerOptions | undefined) => rollup.Plugin<any> | rollup.Plugin<any>[];
5
5
 
6
6
  export = _default;
package/dist/rollup.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as rollup from 'rollup';
2
2
  import * as _tailwindcss_mangle_config from '@tailwindcss-mangle/config';
3
3
 
4
- declare const _default: (options?: _tailwindcss_mangle_config.MangleUserConfig | undefined) => rollup.Plugin<any> | rollup.Plugin<any>[];
4
+ declare const _default: (options?: _tailwindcss_mangle_config.TransformerOptions | undefined) => rollup.Plugin<any> | rollup.Plugin<any>[];
5
5
 
6
6
  export { _default as default };
package/dist/rollup.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  plugin_default
3
- } from "./chunk-SCY3O2DD.js";
4
- import "./chunk-WVLLWHGJ.js";
5
- import "./chunk-GDFDW6UC.js";
3
+ } from "./chunk-5RVUE77A.js";
4
+ import "./chunk-TVEX3BIF.js";
5
+ import "./chunk-YMEGC4U6.js";
6
6
 
7
7
  // src/rollup.ts
8
8
  var rollup_default = plugin_default.rollup;
package/dist/utils.cjs CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkBZZ6FFT4cjs = require('./chunk-BZZ6FFT4.cjs');
9
+ var _chunkQGD6AWGRcjs = require('./chunk-QGD6AWGR.cjs');
10
10
 
11
11
 
12
12
 
@@ -15,4 +15,4 @@ var _chunkBZZ6FFT4cjs = require('./chunk-BZZ6FFT4.cjs');
15
15
 
16
16
 
17
17
 
18
- exports.defaultMangleClassFilter = _chunkBZZ6FFT4cjs.defaultMangleClassFilter; exports.ensureDir = _chunkBZZ6FFT4cjs.ensureDir; exports.escapeStringRegexp = _chunkBZZ6FFT4cjs.escapeStringRegexp; exports.getCacheDir = _chunkBZZ6FFT4cjs.getCacheDir; exports.getGroupedEntries = _chunkBZZ6FFT4cjs.getGroupedEntries; exports.isMap = _chunkBZZ6FFT4cjs.isMap; exports.isRegexp = _chunkBZZ6FFT4cjs.isRegexp;
18
+ exports.defaultMangleClassFilter = _chunkQGD6AWGRcjs.defaultMangleClassFilter; exports.ensureDir = _chunkQGD6AWGRcjs.ensureDir; exports.escapeStringRegexp = _chunkQGD6AWGRcjs.escapeStringRegexp; exports.getCacheDir = _chunkQGD6AWGRcjs.getCacheDir; exports.getGroupedEntries = _chunkQGD6AWGRcjs.getGroupedEntries; exports.isMap = _chunkQGD6AWGRcjs.isMap; exports.isRegexp = _chunkQGD6AWGRcjs.isRegexp;
package/dist/utils.js CHANGED
@@ -6,8 +6,8 @@ import {
6
6
  getGroupedEntries,
7
7
  isMap,
8
8
  isRegexp
9
- } from "./chunk-WVLLWHGJ.js";
10
- import "./chunk-GDFDW6UC.js";
9
+ } from "./chunk-TVEX3BIF.js";
10
+ import "./chunk-YMEGC4U6.js";
11
11
  export {
12
12
  defaultMangleClassFilter,
13
13
  ensureDir,
package/dist/vite.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkE66B4GJ5cjs = require('./chunk-E66B4GJ5.cjs');
4
- require('./chunk-BZZ6FFT4.cjs');
3
+ var _chunk4GIK4Z2Jcjs = require('./chunk-4GIK4Z2J.cjs');
4
+ require('./chunk-QGD6AWGR.cjs');
5
5
 
6
6
  // src/vite.ts
7
- var vite_default = _chunkE66B4GJ5cjs.plugin_default.vite;
7
+ var vite_default = _chunk4GIK4Z2Jcjs.plugin_default.vite;
8
8
 
9
9
 
10
10
  exports.default = vite_default;
package/dist/vite.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as vite from 'vite';
2
2
  import * as _tailwindcss_mangle_config from '@tailwindcss-mangle/config';
3
3
 
4
- declare const _default: (options?: _tailwindcss_mangle_config.MangleUserConfig | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
4
+ declare const _default: (options?: _tailwindcss_mangle_config.TransformerOptions | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
5
5
 
6
6
  export = _default;
package/dist/vite.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as vite from 'vite';
2
2
  import * as _tailwindcss_mangle_config from '@tailwindcss-mangle/config';
3
3
 
4
- declare const _default: (options?: _tailwindcss_mangle_config.MangleUserConfig | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
4
+ declare const _default: (options?: _tailwindcss_mangle_config.TransformerOptions | undefined) => vite.Plugin<any> | vite.Plugin<any>[];
5
5
 
6
6
  export { _default as default };
package/dist/vite.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  plugin_default
3
- } from "./chunk-SCY3O2DD.js";
4
- import "./chunk-WVLLWHGJ.js";
5
- import "./chunk-GDFDW6UC.js";
3
+ } from "./chunk-5RVUE77A.js";
4
+ import "./chunk-TVEX3BIF.js";
5
+ import "./chunk-YMEGC4U6.js";
6
6
 
7
7
  // src/vite.ts
8
8
  var vite_default = plugin_default.vite;
package/dist/webpack.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkE66B4GJ5cjs = require('./chunk-E66B4GJ5.cjs');
4
- require('./chunk-BZZ6FFT4.cjs');
3
+ var _chunk4GIK4Z2Jcjs = require('./chunk-4GIK4Z2J.cjs');
4
+ require('./chunk-QGD6AWGR.cjs');
5
5
 
6
6
  // src/webpack.ts
7
- var webpack_default = _chunkE66B4GJ5cjs.plugin_default.webpack;
7
+ var webpack_default = _chunk4GIK4Z2Jcjs.plugin_default.webpack;
8
8
 
9
9
 
10
10
  exports.default = webpack_default;
@@ -1,6 +1,6 @@
1
1
  import * as webpack from 'webpack';
2
2
  import * as _tailwindcss_mangle_config from '@tailwindcss-mangle/config';
3
3
 
4
- declare const _default: (options?: _tailwindcss_mangle_config.MangleUserConfig | undefined) => webpack.WebpackPluginInstance;
4
+ declare const _default: (options?: _tailwindcss_mangle_config.TransformerOptions | undefined) => webpack.WebpackPluginInstance;
5
5
 
6
6
  export = _default;
package/dist/webpack.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as webpack from 'webpack';
2
2
  import * as _tailwindcss_mangle_config from '@tailwindcss-mangle/config';
3
3
 
4
- declare const _default: (options?: _tailwindcss_mangle_config.MangleUserConfig | undefined) => webpack.WebpackPluginInstance;
4
+ declare const _default: (options?: _tailwindcss_mangle_config.TransformerOptions | undefined) => webpack.WebpackPluginInstance;
5
5
 
6
6
  export { _default as default };
package/dist/webpack.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  plugin_default
3
- } from "./chunk-SCY3O2DD.js";
4
- import "./chunk-WVLLWHGJ.js";
5
- import "./chunk-GDFDW6UC.js";
3
+ } from "./chunk-5RVUE77A.js";
4
+ import "./chunk-TVEX3BIF.js";
5
+ import "./chunk-YMEGC4U6.js";
6
6
 
7
7
  // src/webpack.ts
8
8
  var webpack_default = plugin_default.webpack;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unplugin-tailwindcss-mangle",
3
3
  "type": "module",
4
- "version": "4.1.2",
4
+ "version": "5.1.0",
5
5
  "description": "mangle tailwindcss utilities class plugin. support vite and webpack!",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -65,13 +65,13 @@
65
65
  "dist"
66
66
  ],
67
67
  "dependencies": {
68
- "@rollup/pluginutils": "^5.2.0",
68
+ "@rollup/pluginutils": "^5.3.0",
69
69
  "is-css-request": "^1.0.1",
70
- "magic-string": "^0.30.17",
71
- "unplugin": "^2.3.5",
72
- "@tailwindcss-mangle/core": "^4.1.1",
73
- "@tailwindcss-mangle/shared": "^4.1.1",
74
- "@tailwindcss-mangle/config": "^5.1.1"
70
+ "magic-string": "^0.30.21",
71
+ "unplugin": "^3.0.0",
72
+ "@tailwindcss-mangle/config": "^6.1.1",
73
+ "@tailwindcss-mangle/core": "^5.1.0",
74
+ "@tailwindcss-mangle/shared": "^4.1.1"
75
75
  },
76
76
  "publishConfig": {
77
77
  "access": "public",