mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 15:02:05 -03:30
Fail Rollup build on unresolved imports
Closes #42850 Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
parent
83cfd4a3e2
commit
0610c5bce8
@ -21,6 +21,15 @@ const plugins = [
|
||||
|
||||
const targetDir = "target/classes/theme/keycloak/common/resources/vendor";
|
||||
|
||||
/** @type{import("rollup").WarningHandlerWithDefault} */
|
||||
function onwarn(warning, defaultHandler) {
|
||||
if (warning.code === "UNRESOLVED_IMPORT") {
|
||||
throw new Error(`Unresolved import: ${warning.exporter}`);
|
||||
}
|
||||
|
||||
defaultHandler(warning);
|
||||
}
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
input: [
|
||||
@ -32,6 +41,7 @@ export default defineConfig([
|
||||
format: "es",
|
||||
},
|
||||
plugins,
|
||||
onwarn,
|
||||
},
|
||||
{
|
||||
input: "node_modules/react-dom/cjs/react-dom.production.min.js",
|
||||
@ -41,6 +51,7 @@ export default defineConfig([
|
||||
},
|
||||
external: ["react"],
|
||||
plugins,
|
||||
onwarn,
|
||||
},
|
||||
{
|
||||
input: "src/main/js/web-crypto-shim.js",
|
||||
@ -49,5 +60,6 @@ export default defineConfig([
|
||||
format: "es",
|
||||
},
|
||||
plugins,
|
||||
onwarn,
|
||||
},
|
||||
]);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user