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

@unocss/webpack

Package Overview
Dependencies
Maintainers
1
Versions
331
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@unocss/webpack - npm Package Compare versions

Comparing version 0.12.18 to 0.13.0

41

dist/index.js

@@ -75,9 +75,21 @@ var __create = Object.create;

function createContext(configOrPath, defaults = {}) {
const { config = {}, filepath } = (0, import_config.loadConfig)(configOrPath);
let rawConfig = config;
const uno = (0, import_core.createGenerator)(config, defaults);
const loadConfig = (0, import_config.createConfigLoader)(configOrPath);
let rawConfig = {};
const uno = (0, import_core.createGenerator)(rawConfig, defaults);
let rollupFilter = (0, import_pluginutils.createFilter)(defaultInclude, defaultExclude);
const invalidations = [];
const modules = new import_core.BetterMap();
const tokens = new Set();
let rollupFilter = (0, import_pluginutils.createFilter)(config.include || defaultInclude, config.exclude || defaultExclude);
const ready = reloadConfig();
async function reloadConfig() {
const result = await loadConfig();
rawConfig = result.config;
uno.setConfig(rawConfig);
uno.config.envMode = "dev";
rollupFilter = (0, import_pluginutils.createFilter)(rawConfig.include || defaultInclude, rawConfig.exclude || defaultExclude);
tokens.clear();
await Promise.all(modules.map((code, id) => uno.applyExtractors(code, id, tokens)));
invalidate();
return result;
}
function invalidate() {

@@ -94,17 +106,11 @@ invalidations.forEach((cb) => cb());

}
async function reloadConfig() {
if (!filepath)
return;
rawConfig = (0, import_config.loadConfig)(filepath).config;
uno.setConfig(rawConfig);
uno.config.envMode = "dev";
rollupFilter = (0, import_pluginutils.createFilter)(config.include || defaultInclude, config.exclude || defaultExclude);
tokens.clear();
await Promise.all(modules.map((code, id) => uno.applyExtractors(code, id, tokens)));
invalidate();
}
const filter = (code, id) => {
return code.includes(INCLUDE_COMMENT) || rollupFilter(id);
};
async function getConfig() {
await ready;
return rawConfig;
}
return {
ready,
tokens,

@@ -120,6 +126,3 @@ modules,

extract,
get config() {
return rawConfig;
},
configFilepath: filepath
getConfig
};

@@ -126,0 +129,0 @@ }

{
"name": "@unocss/webpack",
"version": "0.12.18",
"version": "0.13.0",
"description": "The Webpack plugin for UnoCSS",

@@ -37,4 +37,4 @@ "keywords": [

"@rollup/pluginutils": "^4.1.1",
"@unocss/config": "0.12.18",
"@unocss/core": "0.12.18",
"@unocss/config": "0.13.0",
"@unocss/core": "0.13.0",
"unplugin": "^0.2.21",

@@ -41,0 +41,0 @@ "webpack-sources": "^3.2.2"

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