balm-core 4.23.0 → 4.23.1

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.
@@ -75,10 +75,13 @@ const gulpSass = options => transformObj((file, encoding, callback) => {
75
75
  for (const [key, value] of Object.entries(BalmJS.config.scripts.alias)) {
76
76
  options.importers.push({
77
77
  findFileUrl(url) {
78
- if (!url.startsWith(key)) return null;
79
- const newUrl = url.replace(new RegExp(`^${key}`), value);
80
- BalmJS.logger.debug(`${PLUGIN_NAME} alias`, `${url} -> ${newUrl}`);
81
- return pathToFileURL(newUrl);
78
+ if (url.startsWith(key)) {
79
+ const newUrl = url.replace(new RegExp(`^${key}`), value);
80
+ BalmJS.logger.debug(`${PLUGIN_NAME} alias`, `${url} -> ${newUrl}`);
81
+ return pathToFileURL(newUrl);
82
+ } else {
83
+ return pathToFileURL(url);
84
+ }
82
85
  }
83
86
  });
84
87
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "balm-core",
3
- "version": "4.23.0",
3
+ "version": "4.23.1",
4
4
  "description": "BalmJS compiler core",
5
5
  "keywords": [
6
6
  "balm",
@@ -121,5 +121,5 @@
121
121
  "engines": {
122
122
  "node": ">=16"
123
123
  },
124
- "gitHead": "dd622fb3dd42f96992bf73fc238ebe8e725785b4"
124
+ "gitHead": "807bbbce6136e491f6fe8173f7ae9e3c2d29a1b9"
125
125
  }
@@ -61,11 +61,14 @@ const gulpSass = (options) => transformObj((file, encoding, callback) => {
61
61
  for (const [key, value] of Object.entries(BalmJS.config.scripts.alias)) {
62
62
  options.importers.push({
63
63
  findFileUrl(url) {
64
- if (!url.startsWith(key))
65
- return null;
66
- const newUrl = url.replace(new RegExp(`^${key}`), value);
67
- BalmJS.logger.debug(`${PLUGIN_NAME} alias`, `${url} -> ${newUrl}`);
68
- return pathToFileURL(newUrl);
64
+ if (url.startsWith(key)) {
65
+ const newUrl = url.replace(new RegExp(`^${key}`), value);
66
+ BalmJS.logger.debug(`${PLUGIN_NAME} alias`, `${url} -> ${newUrl}`);
67
+ return pathToFileURL(newUrl);
68
+ }
69
+ else {
70
+ return pathToFileURL(url);
71
+ }
69
72
  }
70
73
  });
71
74
  }