@harmoniclabs/pebble 0.1.3-dev4 → 0.1.3-dev7
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.
|
@@ -86,6 +86,12 @@ export class AstCompiler extends DiagnosticEmitter {
|
|
|
86
86
|
this.cfg = cfg;
|
|
87
87
|
this.io = io;
|
|
88
88
|
this.program = new TypedProgram(this.diagnostics);
|
|
89
|
+
// normalize entry to absolute path so import resolution works correctly
|
|
90
|
+
if (typeof cfg.entry === "string" && typeof cfg.root === "string") {
|
|
91
|
+
const resolved = getEnvRelativePath(cfg.entry, cfg.root);
|
|
92
|
+
if (resolved)
|
|
93
|
+
cfg.entry = resolved;
|
|
94
|
+
}
|
|
89
95
|
this._isExporting = false;
|
|
90
96
|
}
|
|
91
97
|
_isExporting;
|
|
@@ -205,7 +211,7 @@ export class AstCompiler extends DiagnosticEmitter {
|
|
|
205
211
|
* the result is store in `this.program`
|
|
206
212
|
*/
|
|
207
213
|
async compile() {
|
|
208
|
-
const filePath = this.cfg.entry;
|
|
214
|
+
const filePath = this.cfg.entry;
|
|
209
215
|
if (!filePath) {
|
|
210
216
|
this.error(DiagnosticCode.File_0_not_found, undefined, this.cfg.entry);
|
|
211
217
|
throw new Error("entry file not found");
|
package/package.json
CHANGED