@unocss/webpack 0.45.14 → 0.45.19
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 +7 -1
- package/dist/index.mjs +7 -1
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -28,6 +28,7 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
|
|
|
28
28
|
}) {
|
|
29
29
|
let root = process.cwd();
|
|
30
30
|
let rawConfig = {};
|
|
31
|
+
let configFileList = [];
|
|
31
32
|
const uno = core.createGenerator(rawConfig, defaults);
|
|
32
33
|
let rollupFilter = pluginutils.createFilter(defaultInclude, defaultExclude);
|
|
33
34
|
const invalidations = [];
|
|
@@ -40,6 +41,7 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
|
|
|
40
41
|
const result = await config.loadConfig(root, configOrPath, extraConfigSources);
|
|
41
42
|
resolveConfigResult(result);
|
|
42
43
|
rawConfig = result.config;
|
|
44
|
+
configFileList = result.sources;
|
|
43
45
|
uno.setConfig(rawConfig);
|
|
44
46
|
uno.config.envMode = "dev";
|
|
45
47
|
rollupFilter = pluginutils.createFilter(
|
|
@@ -111,7 +113,8 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
|
|
|
111
113
|
extract,
|
|
112
114
|
getConfig,
|
|
113
115
|
root,
|
|
114
|
-
updateRoot
|
|
116
|
+
updateRoot,
|
|
117
|
+
getConfigFileList: () => configFileList
|
|
115
118
|
};
|
|
116
119
|
}
|
|
117
120
|
|
|
@@ -123,7 +126,10 @@ const VIRTUAL_ENTRY_ALIAS = [
|
|
|
123
126
|
/^(?:virtual:)?uno(?::(.+))?\.css(\?.*)?$/
|
|
124
127
|
];
|
|
125
128
|
const LAYER_MARK_ALL = "__ALL__";
|
|
129
|
+
const RESOLVED_ID_WITH_QUERY_RE = /\/__uno(?:(_.*?))?\.css(\?.*)?$/;
|
|
126
130
|
function resolveId(id) {
|
|
131
|
+
if (id.match(RESOLVED_ID_WITH_QUERY_RE))
|
|
132
|
+
return id;
|
|
127
133
|
for (const alias of VIRTUAL_ENTRY_ALIAS) {
|
|
128
134
|
const match = id.match(alias);
|
|
129
135
|
if (match) {
|
package/dist/index.mjs
CHANGED
|
@@ -18,6 +18,7 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
|
|
|
18
18
|
}) {
|
|
19
19
|
let root = process.cwd();
|
|
20
20
|
let rawConfig = {};
|
|
21
|
+
let configFileList = [];
|
|
21
22
|
const uno = createGenerator(rawConfig, defaults);
|
|
22
23
|
let rollupFilter = createFilter(defaultInclude, defaultExclude);
|
|
23
24
|
const invalidations = [];
|
|
@@ -30,6 +31,7 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
|
|
|
30
31
|
const result = await loadConfig(root, configOrPath, extraConfigSources);
|
|
31
32
|
resolveConfigResult(result);
|
|
32
33
|
rawConfig = result.config;
|
|
34
|
+
configFileList = result.sources;
|
|
33
35
|
uno.setConfig(rawConfig);
|
|
34
36
|
uno.config.envMode = "dev";
|
|
35
37
|
rollupFilter = createFilter(
|
|
@@ -101,7 +103,8 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = [], res
|
|
|
101
103
|
extract,
|
|
102
104
|
getConfig,
|
|
103
105
|
root,
|
|
104
|
-
updateRoot
|
|
106
|
+
updateRoot,
|
|
107
|
+
getConfigFileList: () => configFileList
|
|
105
108
|
};
|
|
106
109
|
}
|
|
107
110
|
|
|
@@ -113,7 +116,10 @@ const VIRTUAL_ENTRY_ALIAS = [
|
|
|
113
116
|
/^(?:virtual:)?uno(?::(.+))?\.css(\?.*)?$/
|
|
114
117
|
];
|
|
115
118
|
const LAYER_MARK_ALL = "__ALL__";
|
|
119
|
+
const RESOLVED_ID_WITH_QUERY_RE = /\/__uno(?:(_.*?))?\.css(\?.*)?$/;
|
|
116
120
|
function resolveId(id) {
|
|
121
|
+
if (id.match(RESOLVED_ID_WITH_QUERY_RE))
|
|
122
|
+
return id;
|
|
117
123
|
for (const alias of VIRTUAL_ENTRY_ALIAS) {
|
|
118
124
|
const match = id.match(alias);
|
|
119
125
|
if (match) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/webpack",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.19",
|
|
4
4
|
"description": "The Webpack plugin for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@ampproject/remapping": "^2.2.0",
|
|
40
40
|
"@rollup/pluginutils": "^4.2.1",
|
|
41
|
-
"@unocss/config": "0.45.
|
|
42
|
-
"@unocss/core": "0.45.
|
|
43
|
-
"magic-string": "^0.26.
|
|
44
|
-
"unplugin": "^0.9.
|
|
41
|
+
"@unocss/config": "0.45.19",
|
|
42
|
+
"@unocss/core": "0.45.19",
|
|
43
|
+
"magic-string": "^0.26.3",
|
|
44
|
+
"unplugin": "^0.9.5",
|
|
45
45
|
"webpack-sources": "^3.2.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|