@unocss/webpack 0.55.0 → 0.55.2
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 +10 -8
- package/dist/index.d.cts +9 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.mjs +2 -0
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -15,14 +15,14 @@ const MagicString = require('magic-string');
|
|
|
15
15
|
const remapping = require('@ampproject/remapping');
|
|
16
16
|
const node_crypto = require('node:crypto');
|
|
17
17
|
|
|
18
|
-
function
|
|
18
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
19
19
|
|
|
20
|
-
const WebpackSources__default = /*#__PURE__*/
|
|
21
|
-
const process__default = /*#__PURE__*/
|
|
22
|
-
const fs__default = /*#__PURE__*/
|
|
23
|
-
const fg__default = /*#__PURE__*/
|
|
24
|
-
const MagicString__default = /*#__PURE__*/
|
|
25
|
-
const remapping__default = /*#__PURE__*/
|
|
20
|
+
const WebpackSources__default = /*#__PURE__*/_interopDefaultCompat(WebpackSources);
|
|
21
|
+
const process__default = /*#__PURE__*/_interopDefaultCompat(process$1);
|
|
22
|
+
const fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
|
|
23
|
+
const fg__default = /*#__PURE__*/_interopDefaultCompat(fg);
|
|
24
|
+
const MagicString__default = /*#__PURE__*/_interopDefaultCompat(MagicString);
|
|
25
|
+
const remapping__default = /*#__PURE__*/_interopDefaultCompat(remapping);
|
|
26
26
|
|
|
27
27
|
const INCLUDE_COMMENT = "@unocss-include";
|
|
28
28
|
const IGNORE_COMMENT = "@unocss-ignore";
|
|
@@ -317,6 +317,7 @@ function WebpackPlugin(configOrPath, defaults) {
|
|
|
317
317
|
const nonPreTransformers = ctx.uno.config.transformers?.filter((i) => i.enforce !== "pre");
|
|
318
318
|
if (nonPreTransformers?.length) {
|
|
319
319
|
console.warn(
|
|
320
|
+
// eslint-disable-next-line prefer-template
|
|
320
321
|
'[unocss] webpack integration only supports "pre" enforce transformers currently.the following transformers will be ignored\n' + nonPreTransformers.map((i) => ` - ${i.name}`).join("\n")
|
|
321
322
|
);
|
|
322
323
|
}
|
|
@@ -356,6 +357,7 @@ function WebpackPlugin(configOrPath, defaults) {
|
|
|
356
357
|
const layer = getLayer(id);
|
|
357
358
|
return !!layer;
|
|
358
359
|
},
|
|
360
|
+
// serve the placeholders in virtual module
|
|
359
361
|
load(id) {
|
|
360
362
|
const layer = getLayer(id);
|
|
361
363
|
const hash = hashes.get(id);
|
|
@@ -424,5 +426,5 @@ function getLayer(id) {
|
|
|
424
426
|
return layer;
|
|
425
427
|
}
|
|
426
428
|
|
|
427
|
-
exports
|
|
429
|
+
exports.default = WebpackPlugin;
|
|
428
430
|
exports.defineConfig = defineConfig;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as webpack from 'webpack';
|
|
2
|
+
import { UserConfig, UserConfigDefaults } from '@unocss/core';
|
|
3
|
+
|
|
4
|
+
interface WebpackPluginOptions<Theme extends object = object> extends UserConfig<Theme> {
|
|
5
|
+
}
|
|
6
|
+
declare function defineConfig<Theme extends object>(config: WebpackPluginOptions<Theme>): WebpackPluginOptions<Theme>;
|
|
7
|
+
declare function WebpackPlugin<Theme extends object>(configOrPath?: WebpackPluginOptions<Theme> | string, defaults?: UserConfigDefaults): webpack.WebpackPluginInstance;
|
|
8
|
+
|
|
9
|
+
export { WebpackPluginOptions, WebpackPlugin as default, defineConfig };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as webpack from 'webpack';
|
|
2
|
+
import { UserConfig, UserConfigDefaults } from '@unocss/core';
|
|
3
|
+
|
|
4
|
+
interface WebpackPluginOptions<Theme extends object = object> extends UserConfig<Theme> {
|
|
5
|
+
}
|
|
6
|
+
declare function defineConfig<Theme extends object>(config: WebpackPluginOptions<Theme>): WebpackPluginOptions<Theme>;
|
|
7
|
+
declare function WebpackPlugin<Theme extends object>(configOrPath?: WebpackPluginOptions<Theme> | string, defaults?: UserConfigDefaults): webpack.WebpackPluginInstance;
|
|
8
|
+
|
|
9
|
+
export { WebpackPluginOptions, WebpackPlugin as default, defineConfig };
|
package/dist/index.mjs
CHANGED
|
@@ -304,6 +304,7 @@ function WebpackPlugin(configOrPath, defaults) {
|
|
|
304
304
|
const nonPreTransformers = ctx.uno.config.transformers?.filter((i) => i.enforce !== "pre");
|
|
305
305
|
if (nonPreTransformers?.length) {
|
|
306
306
|
console.warn(
|
|
307
|
+
// eslint-disable-next-line prefer-template
|
|
307
308
|
'[unocss] webpack integration only supports "pre" enforce transformers currently.the following transformers will be ignored\n' + nonPreTransformers.map((i) => ` - ${i.name}`).join("\n")
|
|
308
309
|
);
|
|
309
310
|
}
|
|
@@ -343,6 +344,7 @@ function WebpackPlugin(configOrPath, defaults) {
|
|
|
343
344
|
const layer = getLayer(id);
|
|
344
345
|
return !!layer;
|
|
345
346
|
},
|
|
347
|
+
// serve the placeholders in virtual module
|
|
346
348
|
load(id) {
|
|
347
349
|
const layer = getLayer(id);
|
|
348
350
|
const hash = hashes.get(id);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/webpack",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.2",
|
|
4
4
|
"description": "The Webpack plugin for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@ampproject/remapping": "^2.2.1",
|
|
40
|
-
"@rollup/pluginutils": "^5.0.
|
|
40
|
+
"@rollup/pluginutils": "^5.0.3",
|
|
41
41
|
"chokidar": "^3.5.3",
|
|
42
42
|
"fast-glob": "^3.3.1",
|
|
43
43
|
"magic-string": "^0.30.2",
|
|
44
44
|
"unplugin": "^1.4.0",
|
|
45
45
|
"webpack-sources": "^3.2.3",
|
|
46
|
-
"@unocss/config": "0.55.
|
|
47
|
-
"@unocss/core": "0.55.
|
|
46
|
+
"@unocss/config": "0.55.2",
|
|
47
|
+
"@unocss/core": "0.55.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/webpack": "^5.28.1",
|