@unocss/webpack 66.3.1 → 66.3.3

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/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const unplugin = require('./shared/webpack.Ba9iFtiV.cjs');
3
+ const unplugin = require('./shared/webpack.NQTpiUaU.cjs');
4
4
  require('node:path');
5
5
  require('node:process');
6
6
  require('node:fs/promises');
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { u as unplugin } from './shared/webpack.D8KO24In.mjs';
1
+ import { u as unplugin } from './shared/webpack.AwO5g8V4.mjs';
2
2
  import 'node:path';
3
3
  import 'node:process';
4
4
  import 'node:fs/promises';
package/dist/rspack.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const unplugin = require('./shared/webpack.Ba9iFtiV.cjs');
3
+ const unplugin = require('./shared/webpack.NQTpiUaU.cjs');
4
4
  require('node:path');
5
5
  require('node:process');
6
6
  require('node:fs/promises');
package/dist/rspack.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { u as unplugin } from './shared/webpack.D8KO24In.mjs';
1
+ import { u as unplugin } from './shared/webpack.AwO5g8V4.mjs';
2
2
  import 'node:path';
3
3
  import 'node:process';
4
4
  import 'node:fs/promises';
@@ -1,5 +1,5 @@
1
1
  import { resolve, isAbsolute, normalize } from 'node:path';
2
- import process$1 from 'node:process';
2
+ import process from 'node:process';
3
3
  import fs from 'node:fs/promises';
4
4
  import { glob } from 'tinyglobby';
5
5
  import remapping from '@ampproject/remapping';
@@ -143,26 +143,11 @@ const defaultPipelineExclude = [cssIdRE];
143
143
  const defaultPipelineInclude = [/\.(vue|svelte|[jt]sx|vine.ts|mdx?|astro|elm|php|phtml|html)($|\?)/];
144
144
 
145
145
  function deprecationCheck(config) {
146
- let warned = false;
147
- function warn(msg) {
148
- warned = true;
149
- console.warn(`[unocss] ${msg}`);
150
- }
151
- if (config.include)
152
- warn("`include` option is deprecated, use `content.pipeline.include` instead.");
153
- if (config.exclude)
154
- warn("`exclude` option is deprecated, use `content.pipeline.exclude` instead.");
155
- if (config.extraContent)
156
- warn("`extraContent` option is deprecated, use `content` instead.");
157
- if (config.content?.plain)
158
- warn("`content.plain` option is renamed to `content.inline`.");
159
- if (warned && typeof process !== "undefined" && process.env.CI)
160
- throw new Error("deprecation warning");
161
146
  }
162
147
 
163
148
  function createContext(configOrPath, defaults = {}, extraConfigSources = [], resolveConfigResult = () => {
164
149
  }) {
165
- let root = process$1.cwd();
150
+ let root = process.cwd();
166
151
  let rawConfig = {};
167
152
  let configFileList = [];
168
153
  let uno;
@@ -193,8 +178,8 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
193
178
  await uno.setConfig(rawConfig);
194
179
  uno.config.envMode = "dev";
195
180
  rollupFilter = rawConfig.content?.pipeline === false ? () => false : createFilter(
196
- rawConfig.content?.pipeline?.include || rawConfig.include || defaultPipelineInclude,
197
- rawConfig.content?.pipeline?.exclude || rawConfig.exclude || defaultPipelineExclude,
181
+ rawConfig.content?.pipeline?.include || defaultPipelineInclude,
182
+ rawConfig.content?.pipeline?.exclude || defaultPipelineExclude,
198
183
  { resolve: typeof configOrPath === "string" ? configOrPath : root }
199
184
  );
200
185
  tokens.clear();
@@ -322,7 +307,7 @@ const UPDATE_DEBOUNCE = 10;
322
307
  function unplugin(configOrPath, defaults) {
323
308
  return createUnplugin(() => {
324
309
  const ctx = createContext(configOrPath, {
325
- envMode: process$1.env.NODE_ENV === "development" ? "dev" : "build",
310
+ envMode: process.env.NODE_ENV === "development" ? "dev" : "build",
326
311
  ...defaults
327
312
  });
328
313
  const { tokens, filter, extract, onInvalidate, tasks, flushTasks } = ctx;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const node_path = require('node:path');
4
- const process$1 = require('node:process');
4
+ const process = require('node:process');
5
5
  const fs = require('node:fs/promises');
6
6
  const tinyglobby = require('tinyglobby');
7
7
  const remapping = require('@ampproject/remapping');
@@ -16,7 +16,7 @@ const WebpackSources = require('webpack-sources');
16
16
 
17
17
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
18
18
 
19
- const process__default = /*#__PURE__*/_interopDefaultCompat(process$1);
19
+ const process__default = /*#__PURE__*/_interopDefaultCompat(process);
20
20
  const fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
21
21
  const remapping__default = /*#__PURE__*/_interopDefaultCompat(remapping);
22
22
  const MagicString__default = /*#__PURE__*/_interopDefaultCompat(MagicString);
@@ -153,21 +153,6 @@ const defaultPipelineExclude = [core.cssIdRE];
153
153
  const defaultPipelineInclude = [/\.(vue|svelte|[jt]sx|vine.ts|mdx?|astro|elm|php|phtml|html)($|\?)/];
154
154
 
155
155
  function deprecationCheck(config) {
156
- let warned = false;
157
- function warn(msg) {
158
- warned = true;
159
- console.warn(`[unocss] ${msg}`);
160
- }
161
- if (config.include)
162
- warn("`include` option is deprecated, use `content.pipeline.include` instead.");
163
- if (config.exclude)
164
- warn("`exclude` option is deprecated, use `content.pipeline.exclude` instead.");
165
- if (config.extraContent)
166
- warn("`extraContent` option is deprecated, use `content` instead.");
167
- if (config.content?.plain)
168
- warn("`content.plain` option is renamed to `content.inline`.");
169
- if (warned && typeof process !== "undefined" && process.env.CI)
170
- throw new Error("deprecation warning");
171
156
  }
172
157
 
173
158
  function createContext(configOrPath, defaults = {}, extraConfigSources = [], resolveConfigResult = () => {
@@ -203,8 +188,8 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
203
188
  await uno.setConfig(rawConfig);
204
189
  uno.config.envMode = "dev";
205
190
  rollupFilter = rawConfig.content?.pipeline === false ? () => false : unpluginUtils.createFilter(
206
- rawConfig.content?.pipeline?.include || rawConfig.include || defaultPipelineInclude,
207
- rawConfig.content?.pipeline?.exclude || rawConfig.exclude || defaultPipelineExclude,
191
+ rawConfig.content?.pipeline?.include || defaultPipelineInclude,
192
+ rawConfig.content?.pipeline?.exclude || defaultPipelineExclude,
208
193
  { resolve: typeof configOrPath === "string" ? configOrPath : root }
209
194
  );
210
195
  tokens.clear();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/webpack",
3
3
  "type": "module",
4
- "version": "66.3.1",
4
+ "version": "66.3.3",
5
5
  "description": "The Webpack plugin for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -9,7 +9,7 @@
9
9
  "homepage": "https://unocss.dev",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "git+https://github.com/unocss/unocss",
12
+ "url": "git+https://github.com/unocss/unocss.git",
13
13
  "directory": "packages-integrations/webpack"
14
14
  },
15
15
  "bugs": {
@@ -68,8 +68,8 @@
68
68
  "unplugin": "^2.3.5",
69
69
  "unplugin-utils": "^0.2.4",
70
70
  "webpack-sources": "^3.3.3",
71
- "@unocss/core": "66.3.1",
72
- "@unocss/config": "66.3.1"
71
+ "@unocss/config": "66.3.3",
72
+ "@unocss/core": "66.3.3"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@types/webpack": "^5.28.5",