Skip to content

Commit c79aaea

Browse files
committed
fix(npm-scripts): don't fail for default exports
When an `export default ...` is placed in a file the build failed unless it was an `export default ... from ...`.
1 parent c380ba0 commit c79aaea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

projects/npm-tools/packages/npm-scripts/src/transform/js/relocateImports.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ module.exports = function (previousDirRelPath) {
5050

5151
if (
5252
NODE_TYPES.has(node.type) &&
53+
source &&
5354
source.value.startsWith('./')
5455
) {
5556
source.value = source.value.replace(/^\./, dotReplacement);

0 commit comments

Comments
 (0)