Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 41cc589

Browse filesBrowse files
committed
WIP on getting require cycles working
1 parent 87a6096 commit 41cc589
Copy full SHA for 41cc589

File tree

Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-2
lines changed

‎src/ExportMap.js

Copy file name to clipboardExpand all lines: src/ExportMap.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,8 @@ ExportMap.parse = function (path, content, context) {
409409
processDynamicImport(node.source);
410410
},
411411
CallExpression(node) {
412-
if (node.callee.type === 'Import') {
412+
if (node.callee.type === 'Import' ||
413+
(node.callee.type === 'Identifier' && node.callee.name === 'require')) {
413414
processDynamicImport(node.arguments[0]);
414415
}
415416
},

‎utils/unambiguous.js

Copy file name to clipboardExpand all lines: utils/unambiguous.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ const pattern = /(^|;)\s*(export|import)((\s+\w)|(\s*[{*=]))|import\(/m;
1313
* @type {RegExp}
1414
*/
1515
exports.test = function isMaybeUnambiguousModule(content) {
16-
return pattern.test(content);
16+
return true;
17+
// return pattern.test(content);
1718
};
1819

1920
// future-/Babel-proof at the expense of being a little loose

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.