Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

windicss-webpack-plugin

Package Overview
Dependencies
Maintainers
4
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

windicss-webpack-plugin - npm Package Compare versions

Comparing version 1.6.10 to 1.7.0

dist/core/client.js

16

dist/core/constants.js

@@ -6,3 +6,3 @@ "use strict";

});
exports.NAME = exports.MODULE_ID_VIRTUAL_TEST = exports.MODULE_ID_VIRTUAL_PREFIX = exports.MODULE_ID_VIRTUAL_MODULES = exports.MODULE_ID = exports.HAS_THEME_FUNCTION_TEST = exports.HAS_DIRECTIVE_TEST = void 0;
exports.NAME = exports.MODULE_ID_VIRTUAL_TEST = exports.MODULE_ID_VIRTUAL_PREFIX = exports.MODULE_ID_VIRTUAL_MODULES = exports.MODULE_ID = exports.HAS_THEME_FUNCTION_TEST = exports.HAS_DIRECTIVE_TEST = exports.DEVTOOLS_VIRTUAL_MODULE_ID = exports.DEVTOOLS_VIRTUAL_MODULE = exports.DEVTOOLS_POST_PATH = exports.DEVTOOLS_MODULE_ID = exports.DEFAULT_SERVER_PORT = exports.DEFAULT_SERVER_HOST = void 0;
const NAME = "windicss-webpack-plugin";

@@ -21,2 +21,14 @@ exports.NAME = NAME;

const HAS_THEME_FUNCTION_TEST = /theme\(.*?\)/;
exports.HAS_THEME_FUNCTION_TEST = HAS_THEME_FUNCTION_TEST;
exports.HAS_THEME_FUNCTION_TEST = HAS_THEME_FUNCTION_TEST;
const DEVTOOLS_MODULE_ID = "windi-devtools";
exports.DEVTOOLS_MODULE_ID = DEVTOOLS_MODULE_ID;
const DEVTOOLS_VIRTUAL_MODULE_ID = "virtual:windi-devtools";
exports.DEVTOOLS_VIRTUAL_MODULE_ID = DEVTOOLS_VIRTUAL_MODULE_ID;
const DEVTOOLS_VIRTUAL_MODULE = "virtual:windi-devtools.js";
exports.DEVTOOLS_VIRTUAL_MODULE = DEVTOOLS_VIRTUAL_MODULE;
const DEVTOOLS_POST_PATH = "/@windicss-devtools-update";
exports.DEVTOOLS_POST_PATH = DEVTOOLS_POST_PATH;
const DEFAULT_SERVER_HOST = "127.0.0.1";
exports.DEFAULT_SERVER_HOST = DEFAULT_SERVER_HOST;
const DEFAULT_SERVER_PORT = 8888;
exports.DEFAULT_SERVER_PORT = DEFAULT_SERVER_PORT;

@@ -6,3 +6,5 @@ "use strict";

});
exports.transformCSS = exports.isJsx = exports.def = exports.cssRequiresTransform = void 0;
exports.def = exports.cssRequiresTransform = void 0;
exports.getChangedModuleNames = getChangedModuleNames;
exports.transformCSS = exports.isWebCompilerTarget = exports.isJsx = exports.isDev = void 0;

@@ -60,2 +62,33 @@ var _constants = require("./constants");

exports.def = def;
exports.def = def;
function getChangedModuleNames(utils) {
if (utils.hasPending) utils.buildPendingStyles();
const moduleNames = [`${_constants.MODULE_ID_VIRTUAL_PREFIX}.css`];
Object.entries(utils.layersMeta).forEach(([name, meta]) => {
if (meta.cssCache == null) moduleNames.push(`${_constants.MODULE_ID_VIRTUAL_PREFIX}-${name}.css`);
});
return moduleNames;
}
const isDev = () => process.env.NODE_ENV === "development";
exports.isDev = isDev;
const isWebCompilerTarget = target => {
let isWeb = true;
if (typeof target === "string") {
isWeb = !target.includes("node");
} else if (Array.isArray(target)) {
target.forEach(str => {
if (str.includes("node")) isWeb = false;
});
} else {
isWeb = false;
}
return isWeb;
};
exports.isWebCompilerTarget = isWebCompilerTarget;
import webpack from 'webpack';
import { WindiPluginUtils, UserOptions } from '@windicss/plugin-utils';
import http from 'http';
declare class Server {
server: http.Server;
host: string;
port: number;
_listen: boolean;
constructor(compiler: Compiler, options: WindiCSSWebpackPluginOptions['server']);
ensureStart(): Promise<this>;
close(): void;
}
declare module 'virtual:windi.css' { }

@@ -18,2 +29,4 @@ declare module 'virtual:windi-base.css' { }

initException?: Error;
invalidateCssModules: (resource: string, modules: string[]) => void;
server: Server;
};

@@ -33,2 +46,19 @@ };

virtualModulePath: string;
/**
* Options for devtools backend server.
*/
server?: {
/**
* Port for devtools backend server.
*
* @default 8888
*/
port?: number;
/**
* Host for devtools backend server.
*
* @default '127.0.0.1'
*/
host?: string;
};
};

@@ -35,0 +65,0 @@

13

package.json
{
"name": "windicss-webpack-plugin",
"version": "1.6.10",
"version": "1.7.0",
"license": "MIT",

@@ -27,3 +27,4 @@ "author": {

"@windicss/plugin-utils": "^1.8.4",
"debug": "^4.3.3",
"debug": "^4.3.4",
"get-port": "^6.1.2",
"loader-utils": "^2.0.0",

@@ -36,3 +37,3 @@ "lodash": "^4.17.21",

"devDependencies": {
"@antfu/eslint-config": "^0.20.2",
"@antfu/eslint-config": "^0.20.6",
"@babel/preset-env": "^7.15.8",

@@ -44,3 +45,3 @@ "@babel/preset-react": "^7.14.5",

"@types/loader-utils": "^2.0.3",
"@types/lodash": "^4.14.181",
"@types/lodash": "^4.14.182",
"@types/webpack": "^4.41.31",

@@ -60,4 +61,4 @@ "babel-loader": "^8.2.3",

"typescript": "^4.6.3",
"unbuild": "^0.7.3",
"vite": "^2.9.1",
"unbuild": "^0.7.4",
"vite": "^2.9.5",
"vitest": "^0.9.3",

@@ -64,0 +65,0 @@ "vue-loader": "^15.9.8",

@@ -41,4 +41,18 @@ <h1 align='center'>windicss-webpack-plugin</h1>

## New Features in v3.0
## New Webpack Plugin Features
**Design in DevTools mode**
Add the import with your existing windi imports and you'll have autocompletion in your Chrome DevTools!
```js
import 'virtual:windi-devtools'
```
<img src="https://user-images.githubusercontent.com/41503212/163978055-9be54838-5156-47ca-a2e7-f94480806002.gif" width="300" />
Thanks [await-ovo](https://github.com/await-ovo)!
## New Windi v3.0 Features
### [Attributify Mode](https://windicss.org/posts/v30.html#attributify-mode)

@@ -45,0 +59,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc