@unocss/webpack 0.30.13 → 0.31.3

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 CHANGED
@@ -47,7 +47,8 @@ function getLayerPlaceholder(layer) {
47
47
  const INCLUDE_COMMENT = "@unocss-include";
48
48
  const CSS_PLACEHOLDER = "@unocss-placeholder";
49
49
 
50
- function createContext(configOrPath, defaults = {}, extraConfigSources = []) {
50
+ function createContext(configOrPath, defaults = {}, extraConfigSources = [], resolveConfigResult = () => {
51
+ }) {
51
52
  const loadConfig = config.createConfigLoader(configOrPath, extraConfigSources);
52
53
  let rawConfig = {};
53
54
  const uno = core.createGenerator(rawConfig, defaults);
@@ -58,6 +59,7 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = []) {
58
59
  const ready = reloadConfig();
59
60
  async function reloadConfig() {
60
61
  const result = await loadConfig();
62
+ resolveConfigResult(result);
61
63
  rawConfig = result.config;
62
64
  uno.setConfig(rawConfig);
63
65
  uno.config.envMode = "dev";
package/dist/index.mjs CHANGED
@@ -39,7 +39,8 @@ function getLayerPlaceholder(layer) {
39
39
  const INCLUDE_COMMENT = "@unocss-include";
40
40
  const CSS_PLACEHOLDER = "@unocss-placeholder";
41
41
 
42
- function createContext(configOrPath, defaults = {}, extraConfigSources = []) {
42
+ function createContext(configOrPath, defaults = {}, extraConfigSources = [], resolveConfigResult = () => {
43
+ }) {
43
44
  const loadConfig = createConfigLoader(configOrPath, extraConfigSources);
44
45
  let rawConfig = {};
45
46
  const uno = createGenerator(rawConfig, defaults);
@@ -50,6 +51,7 @@ function createContext(configOrPath, defaults = {}, extraConfigSources = []) {
50
51
  const ready = reloadConfig();
51
52
  async function reloadConfig() {
52
53
  const result = await loadConfig();
54
+ resolveConfigResult(result);
53
55
  rawConfig = result.config;
54
56
  uno.setConfig(rawConfig);
55
57
  uno.config.envMode = "dev";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/webpack",
3
- "version": "0.30.13",
3
+ "version": "0.31.3",
4
4
  "description": "The Webpack plugin for UnoCSS",
5
5
  "keywords": [
6
6
  "unocss",
@@ -36,16 +36,16 @@
36
36
  "webpack": "^4 || ^5"
37
37
  },
38
38
  "dependencies": {
39
- "@rollup/pluginutils": "^4.2.0",
40
- "@unocss/config": "0.30.13",
41
- "@unocss/core": "0.30.13",
42
- "unplugin": "^0.6.1",
39
+ "@rollup/pluginutils": "^4.2.1",
40
+ "@unocss/config": "0.31.3",
41
+ "@unocss/core": "0.31.3",
42
+ "unplugin": "^0.6.2",
43
43
  "webpack-sources": "^3.2.3"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/webpack": "^5.28.0",
47
47
  "@types/webpack-sources": "^3.2.0",
48
- "webpack": "^5.71.0"
48
+ "webpack": "^5.72.0"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "unbuild",