postcss-html
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -69,3 +69,5 @@ "use strict"; | ||
if (definedLangs.has(lang)) { | ||
throw new Error(`The module cannot be loaded: ${syntax}`); | ||
throw new Error( | ||
`Cannot resolve module "${syntax}". It's likely that the module isn't installed correctly. Try reinstalling by running the \`npm install ${syntax}@latest --save-dev\`` | ||
); | ||
} | ||
@@ -116,3 +118,6 @@ } | ||
return m.createRequire(relativeTo)(syntax); | ||
} catch { | ||
} catch (error) { | ||
if (!isModuleNotFoundError(error)) { | ||
throw error; | ||
} | ||
// ignore | ||
@@ -124,3 +129,6 @@ } | ||
return standardModuleResolvers[syntax](); | ||
} catch { | ||
} catch (error) { | ||
if (!isModuleNotFoundError(error)) { | ||
throw error; | ||
} | ||
// ignore | ||
@@ -132,1 +140,7 @@ } | ||
} | ||
function isModuleNotFoundError(error) { | ||
return ( | ||
error && typeof error === "object" && error.code === "MODULE_NOT_FOUND" | ||
); | ||
} |
{ | ||
"name": "postcss-html", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24024
614