-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(compiler): correct module-resolver error messages @bug W-5192589@ #551
Conversation
Benchmark resultsBase commit: |
|
||
const { diagnostics, result, success } = await compile(COMPILER_CONFIG_BASEDIR); | ||
expect(success).toBe(false); | ||
console.log(diagnostics); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove console.log
const { diagnostics, result, success } = await compile(COMPILER_CONFIG_BASEDIR); | ||
expect(success).toBe(false); | ||
console.log(diagnostics); | ||
expect(diagnostics[0].level).toBe(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Diagnostive.Error
instead of 0
.
"foo.js": ` | ||
import { Element } from 'engine'; | ||
export default class Test extends Element {}`, | ||
"foo.html": `<template><p>Component Template</p></template>`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to have an html file if the entry point can't be resolved.
namespace: "x", | ||
files: { | ||
"foo.js": ` | ||
import { Element } from 'engine'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep the test minimal remove the entry file content empty.
export default class Test extends Element { | ||
get mytitle() { return nested; } | ||
}`, | ||
"foo.html": `<template><p>Component Template</p></template>`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the html file.
files: { | ||
"foo.js": ` | ||
import { Element } from 'engine'; | ||
import { nested } from './lib/foo'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep the test minimal and only keep an import statement.
import './lib/foo';
name: "foo", | ||
namespace: "x", | ||
files: { | ||
"foo.js": ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also make this test minimal?
Benchmark resultsBase commit: lwc-engine-benchmark
|
Benchmark resultsBase commit: lwc-engine-benchmark
|
Details
Edit the error messages to provide a more clear description of the issue.
Does this PR introduce a breaking change?