Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Account for modules without importNames
importNames is used for tree-shaking, but non-ES modules will not have this metadata. Previously we assumed anything with `importSpecifiers` also had `importNames`, but this isn't the case; stache files have the specifiers metadata which is used for error reporting.
- Loading branch information
Showing
6 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
THIS IS A TEXT FILE HA HA HA. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { assign } from './dep'; | ||
import './other'; | ||
import './file.txt!~/text'; | ||
|
||
window.APP = { assign }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
exports.translate = function(load) { | ||
load.metadata.importSpecifiers = { | ||
"./dep": { | ||
start: { line: 1, column: 28 }, | ||
end: { line: 1, column: 30 }, | ||
} | ||
}; | ||
return "require('./dep'); module.exports = function(){};"; | ||
}; |