Owain
07/21/2025, 9:38 AMSebastiaan
07/21/2025, 10:12 AMnode_modules
and do a fresh npm install
)?Owain
07/21/2025, 10:48 AMOwain
07/21/2025, 10:59 AM11:58:12 [vite] (client) Pre-transform error: Failed to resolve import "@umbraco-cms/backoffice/extension-registry" from "App_Plugins/MyProject/index-CmOw9dJJ.js". Does the file exist?
Plugin: vite:import-analysis
File: C:/Users/Owain Williams/Dev/xxxx-website/xxxx.Web/App_Plugins/MyProject/index-CmOw9dJJ.js:8:40
Owain
07/21/2025, 11:00 AM11:58:12 [vite] Internal server error: Failed to resolve import "@umbraco-cms/backoffice/auth" from "App_Plugins/MyProject/entrypoint-C0XIkctw.js". Does the file exist?
Plugin: vite:import-analysis
File: C:/Users/Owain Williams/Dev/xxx-website/MyProject.Web/App_Plugins/MyProject/entrypoint-C0XIkctw.js:1:40
1 | import { UMB_AUTH_CONTEXT as i } from "@umbraco-cms/backoffice/auth";
| ^
2 | import { c as r } from "./index-CmOw9dJJ.js";
3 | const m = (s, n) => {
Owain
07/21/2025, 11:01 AMimport { UMB_AUTH_CONTEXT } from "@umbraco-cms/backoffice/auth";
Owain
07/21/2025, 11:03 AMimport { UmbConditionBase } from '@umbraco-cms/backoffice/extension-registry';
Owain
07/21/2025, 11:25 AMOwain
07/21/2025, 11:31 AMSebastiaan
07/21/2025, 12:22 PMSebastiaan
07/21/2025, 12:23 PMOwain
07/21/2025, 1:02 PMOwain
07/21/2025, 1:28 PMSebastiaan
07/21/2025, 2:15 PMimport { defineConfig } from "vite";
export default defineConfig({
build: {
lib: {
entry: "src/bundle.manifests.ts", // Bundle registers one or more manifests
formats: ["es"],
fileName: "cultiv-test",
},
outDir: "../wwwroot/App_Plugins/CultivTest", // your web component will be saved in this location
emptyOutDir: true,
sourcemap: true,
rollupOptions: {
external: [/^@umbraco/],
},
}
});
Should look something like this and the rollupOptions
are important here. From the error it looks like your entrypoint is trying to directly access the auth library, but it needs to come from external.Owain
07/21/2025, 3:51 PM