How to use the @lwc/errors.ModuleResolutionErrors.IMPORTEE_RESOLUTION_FROM_IMPORTER_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
const absPath = getAbsolutePath(importee, importer, options);
    const caseIgnoredFilename = getCaseIgnoredFilenameMatch(options.files, absPath);

    return caseIgnoredFilename
        ? generateCompilerError(ModuleResolutionErrors.IMPORT_AND_FILE_NAME_CASE_MISMATCH, {
              messageArgs: [
                  importee,
                  importer,
                  caseIgnoredFilename.substr(
                      0,
                      caseIgnoredFilename.length - path.extname(caseIgnoredFilename).length
                  ),
              ],
              origin: { filename: importer },
          })
        : generateCompilerError(ModuleResolutionErrors.IMPORTEE_RESOLUTION_FROM_IMPORTER_FAILED, {
              messageArgs: [importee, importer, absPath],
              origin: { filename: importer },
          });
}
github salesforce / lwc / packages / @lwc / compiler / src / rollup-plugins / module-resolver.ts View on Github external
const absPath = getAbsolutePath(importee, importer, options);
    const caseIgnoredFilename = getCaseIgnoredFilenameMatch(options.files, absPath);

    return caseIgnoredFilename
        ? generateCompilerError(ModuleResolutionErrors.IMPORT_AND_FILE_NAME_CASE_MISMATCH, {
              messageArgs: [
                  importee,
                  importer,
                  caseIgnoredFilename.substr(
                      0,
                      caseIgnoredFilename.length - path.extname(caseIgnoredFilename).length
                  ),
              ],
              origin: { filename: importer },
          })
        : generateCompilerError(ModuleResolutionErrors.IMPORTEE_RESOLUTION_FROM_IMPORTER_FAILED, {
              messageArgs: [importee, importer, absPath],
              origin: { filename: importer },
          });
}