@hao360/cube-css-loader
Advanced tools
+4
-5
| const css = require('css'); | ||
| const loaderUtils = require('loader-utils'); | ||
| global.cubeWcssData = global.cubeWcssData || {}; | ||
| /** 添加样式命名空间前缀 */ | ||
@@ -30,3 +32,3 @@ function addPrefix(cssAst, preSelector, widthRules){ | ||
| i+= expandRule.rules.length - 1; | ||
| } else if (/^(min\-width|max\-width|width)\:\s+\d+(px)?/.test(cubeRule)) { | ||
| } else if (/^(min\-width|max\-width|width)\:\s*\d+(px)?/.test(cubeRule)) { | ||
| /** 宽度数据 */ | ||
@@ -97,6 +99,3 @@ let widthRuleObj = cubeRule.split(':'); | ||
| const wcssData = responsiveWidth(widthRules, options.compress); | ||
| if(!global.cubeWcssData){ | ||
| global.cubeWcssData = [] | ||
| } | ||
| global.cubeWcssData = global.cubeWcssData.concat(wcssData); | ||
| global.cubeWcssData[this.resourcePath] = wcssData; | ||
| } | ||
@@ -103,0 +102,0 @@ |
+1
-1
| { | ||
| "name": "@hao360/cube-css-loader", | ||
| "version": "1.1.0", | ||
| "version": "1.1.1", | ||
| "description": "cube css loader", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
0
-100%4085
-0.63%101
-1.94%