@unocss/webpack 0.12.15 → 0.12.16
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.js +6 -2
- package/dist/index.mjs +6 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -73,6 +73,7 @@ var import_config = __toModule(require("@unocss/config"));
|
|
|
73
73
|
var import_core = __toModule(require("@unocss/core"));
|
|
74
74
|
function createContext(configOrPath, defaults = {}) {
|
|
75
75
|
const { config = {}, filepath } = (0, import_config.loadConfig)(configOrPath);
|
|
76
|
+
let rawConfig = config;
|
|
76
77
|
const uno = (0, import_core.createGenerator)(config, defaults);
|
|
77
78
|
const invalidations = [];
|
|
78
79
|
const modules = new import_core.BetterMap();
|
|
@@ -92,7 +93,8 @@ function createContext(configOrPath, defaults = {}) {
|
|
|
92
93
|
async function reloadConfig() {
|
|
93
94
|
if (!filepath)
|
|
94
95
|
return;
|
|
95
|
-
|
|
96
|
+
rawConfig = (0, import_config.loadConfig)(filepath).config;
|
|
97
|
+
uno.setConfig(rawConfig);
|
|
96
98
|
uno.config.envMode = "dev";
|
|
97
99
|
rollupFilter = (0, import_pluginutils.createFilter)(config.include || defaultInclude, config.exclude || defaultExclude);
|
|
98
100
|
tokens.clear();
|
|
@@ -113,7 +115,9 @@ function createContext(configOrPath, defaults = {}) {
|
|
|
113
115
|
reloadConfig,
|
|
114
116
|
uno,
|
|
115
117
|
extract,
|
|
116
|
-
config
|
|
118
|
+
get config() {
|
|
119
|
+
return rawConfig;
|
|
120
|
+
},
|
|
117
121
|
configFilepath: filepath
|
|
118
122
|
};
|
|
119
123
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -45,6 +45,7 @@ import { loadConfig } from "@unocss/config";
|
|
|
45
45
|
import { BetterMap, createGenerator } from "@unocss/core";
|
|
46
46
|
function createContext(configOrPath, defaults = {}) {
|
|
47
47
|
const { config = {}, filepath } = loadConfig(configOrPath);
|
|
48
|
+
let rawConfig = config;
|
|
48
49
|
const uno = createGenerator(config, defaults);
|
|
49
50
|
const invalidations = [];
|
|
50
51
|
const modules = new BetterMap();
|
|
@@ -64,7 +65,8 @@ function createContext(configOrPath, defaults = {}) {
|
|
|
64
65
|
async function reloadConfig() {
|
|
65
66
|
if (!filepath)
|
|
66
67
|
return;
|
|
67
|
-
|
|
68
|
+
rawConfig = loadConfig(filepath).config;
|
|
69
|
+
uno.setConfig(rawConfig);
|
|
68
70
|
uno.config.envMode = "dev";
|
|
69
71
|
rollupFilter = createFilter(config.include || defaultInclude, config.exclude || defaultExclude);
|
|
70
72
|
tokens.clear();
|
|
@@ -85,7 +87,9 @@ function createContext(configOrPath, defaults = {}) {
|
|
|
85
87
|
reloadConfig,
|
|
86
88
|
uno,
|
|
87
89
|
extract,
|
|
88
|
-
config
|
|
90
|
+
get config() {
|
|
91
|
+
return rawConfig;
|
|
92
|
+
},
|
|
89
93
|
configFilepath: filepath
|
|
90
94
|
};
|
|
91
95
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/webpack",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.16",
|
|
4
4
|
"description": "The Webpack plugin for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@rollup/pluginutils": "^4.1.1",
|
|
37
|
-
"@unocss/config": "0.12.
|
|
38
|
-
"@unocss/core": "0.12.
|
|
37
|
+
"@unocss/config": "0.12.16",
|
|
38
|
+
"@unocss/core": "0.12.16",
|
|
39
39
|
"unplugin": "^0.2.21",
|
|
40
40
|
"webpack-sources": "^3.2.2"
|
|
41
41
|
},
|