balm-core 3.33.3 → 3.33.4

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.
@@ -129,14 +129,14 @@ var gulpSass = function gulpSass(options) {
129
129
  return /^@[a-z0-9-]{1,213}/.test(key);
130
130
  });
131
131
  if (aliasKeys.length) {
132
- var aliasKeyRegex = new RegExp("^".concat(aliasKeys.join('|')));
132
+ var aliasKeyRegex = new RegExp("^(".concat(aliasKeys.join('|'), ")/"));
133
133
  opts.importer = [function (url) {
134
134
  var file = url;
135
135
  var result = url.match(aliasKeyRegex);
136
- var key = result ? result[0] : null;
136
+ var key = result ? result[1] : null;
137
137
  if (key) {
138
- file = url.replace(aliasKeyRegex, BalmJS.config.scripts.alias[key]);
139
- BalmJS.logger.debug("".concat(PLUGIN_NAME, " alias"), "".concat(url, " -> ").concat(file));
138
+ file = url.replace(key, BalmJS.config.scripts.alias[key]);
139
+ BalmJS.logger.debug("".concat(PLUGIN_NAME, " alias"), "".concat(key, " -> ").concat(url, " => ").concat(file));
140
140
  }
141
141
  return {
142
142
  file: file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "balm-core",
3
- "version": "3.33.3",
3
+ "version": "3.33.4",
4
4
  "description": "BalmJS compiler core",
5
5
  "keywords": [
6
6
  "balm",
@@ -119,5 +119,5 @@
119
119
  "engines": {
120
120
  "node": ">=10.13.0"
121
121
  },
122
- "gitHead": "c63f9845f35b36a095a5dea1c18baed22ee6409c"
122
+ "gitHead": "73e6c5363b8ca6954e36691cf026054cf4798e10"
123
123
  }
@@ -80,15 +80,15 @@ const gulpSass = (options) => transformObj((file, encoding, callback) => {
80
80
  if (!opts.importer) {
81
81
  const aliasKeys = Object.keys(BalmJS.config.scripts.alias).filter((key) => /^@[a-z0-9-]{1,213}/.test(key));
82
82
  if (aliasKeys.length) {
83
- const aliasKeyRegex = new RegExp(`^${aliasKeys.join('|')}`);
83
+ const aliasKeyRegex = new RegExp(`^(${aliasKeys.join('|')})/`);
84
84
  opts.importer = [
85
85
  function (url) {
86
86
  let file = url;
87
87
  const result = url.match(aliasKeyRegex);
88
- const key = result ? result[0] : null;
88
+ const key = result ? result[1] : null;
89
89
  if (key) {
90
- file = url.replace(aliasKeyRegex, BalmJS.config.scripts.alias[key]);
91
- BalmJS.logger.debug(`${PLUGIN_NAME} alias`, `${url} -> ${file}`);
90
+ file = url.replace(key, BalmJS.config.scripts.alias[key]);
91
+ BalmJS.logger.debug(`${PLUGIN_NAME} alias`, `${key} -> ${url} => ${file}`);
92
92
  }
93
93
  return { file };
94
94
  }