How to use the @lwc/errors.ModuleResolutionErrors.IMPORTEE_RESOLUTION_FAILED function in @lwc/errors

To help you get started, we’ve selected a few @lwc/errors examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github salesforce / lwc / packages / @lwc / compiler / src / rollup-plugins / module-resolver.ts View on Github external
function generateEntryResolutionError(
    importee: string,
    importer: string,
    options: NormalizedCompilerOptions
) {
    const absPath = getAbsolutePath(importee, importer, options);
    const caseIgnoredFilename = getCaseIgnoredFilenameMatch(options.files, absPath);

    return caseIgnoredFilename
        ? generateCompilerError(ModuleResolutionErrors.FOLDER_AND_FILE_NAME_CASE_MISMATCH, {
              messageArgs: [caseIgnoredFilename, importee],
              origin: { filename: importer },
          })
        : generateCompilerError(ModuleResolutionErrors.IMPORTEE_RESOLUTION_FAILED, {
              messageArgs: [importee],
              origin: { filename: importer },
          });
}
github salesforce / lwc / packages / @lwc / compiler / src / rollup-plugins / module-resolver.ts View on Github external
function generateEntryResolutionError(
    importee: string,
    importer: string,
    options: NormalizedCompileOptions
) {
    const absPath = getAbsolutePath(importee, importer, options);
    const caseIgnoredFilename = getCaseIgnoredFilenameMatch(options.files, absPath);

    return caseIgnoredFilename
        ? generateCompilerError(ModuleResolutionErrors.FOLDER_AND_FILE_NAME_CASE_MISMATCH, {
              messageArgs: [caseIgnoredFilename, importee],
              origin: { filename: importer },
          })
        : generateCompilerError(ModuleResolutionErrors.IMPORTEE_RESOLUTION_FAILED, {
              messageArgs: [importee],
              origin: { filename: importer },
          });
}