You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2019/05/23 15:29:48 UTC
[incubator-annotator] 02/05: Restrict Babel resolver alias to bare
specifiers
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit 0ffc4bcdd4794eee21d4e2c05da7f3504aa22aac
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Thu May 23 11:24:19 2019 -0400
Restrict Babel resolver alias to bare specifiers
Rather than aliasing resolving subpaths of packages of the annotator
scope, only alias bare specifiers. There should never be a deep import
because all public APIs should be exported through the top-level
namespace module of a package.
---
babel.config.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/babel.config.js b/babel.config.js
index aed0a9e..0bff4ff 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -33,7 +33,7 @@ module.exports = api => {
// Used for resolving source files during development and testing.
let resolverOptions = {
alias: {
- '^(@annotator/.+?)(/|$)': '\\1/src',
+ '^@annotator/(.+)$': '@annotator/\\1/src/index.js',
},
};