babel-plugin-hylid-bridge 2.12.0-alpha.4 → 2.12.0-alpha.5

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/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.12.0-alpha.5] (2023-07-20)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * 检查文件是否存在
12
+
13
+
14
+
6
15
  ## [2.12.0-alpha.4] (2023-07-20)
7
16
 
8
17
 
package/lib/index.js CHANGED
@@ -194,7 +194,8 @@ var _default = function _default(core, opts) {
194
194
  nodes.push.apply(nodes, (0, _toConsumableArray2.default)(targets.map(function (target) {
195
195
  var targetSplit = splitTarget(target);
196
196
  var innerIndexPath = "".concat(libraryName, "/lib/clients/").concat(targetSplit[0], "/").concat(targetSplit[1], "/index");
197
- var normalizedIndexPath = polyfillDir ? (0, _combineExports.default)(require.resolve(innerIndexPath), _path.default.resolve(polyfillDir, targetSplit[0], targetSplit[1])) : innerIndexPath;
197
+ var polyfillIndexPath = polyfillDir && _path.default.resolve(polyfillDir, targetSplit[0], targetSplit[1], 'index');
198
+ var normalizedIndexPath = polyfillIndexPath && (_fsExtra.default.existsSync("".concat(polyfillIndexPath, ".js")) || _fsExtra.default.existsSync("".concat(polyfillIndexPath, ".ts"))) ? (0, _combineExports.default)(require.resolve(innerIndexPath), polyfillIndexPath) : innerIndexPath;
198
199
  return babelTypes.importDeclaration([babelTypes.importDefaultSpecifier(babelTypes.identifier("".concat(identifierPrefix).concat(targetSplit[0], "_").concat(targetSplit[1], "_my__")))], babelTypes.stringLiteral(normalizedIndexPath));
199
200
  })));
200
201
  var buildElseIf = function buildElseIf(targetList) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babel-plugin-hylid-bridge",
3
- "version": "2.12.0-alpha.4",
3
+ "version": "2.12.0-alpha.5",
4
4
  "description": "babel-plugin-hylid-bridge",
5
5
  "main": "lib/index.js",
6
6
  "files": [
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "babel-plugin-tester": "^10.1.0",
24
- "hylid-bridge": "^2.12.0-alpha.4"
24
+ "hylid-bridge": "^2.12.0-alpha.5"
25
25
  },
26
26
  "sideEffects": false,
27
27
  "registry": "https://registry.npmjs.org/"