Skip to content
Snippets Groups Projects
Commit bf0a88a0 authored by Julian's avatar Julian
Browse files

Merge remote-tracking branch 'origin/759-finalise-vuetify-app-as-spa' into...

Merge remote-tracking branch 'origin/759-finalise-vuetify-app-as-spa' into 759-finalise-vuetify-app-as-spa

# Conflicts:
#	aleksis/core/vite.config.js
parents 73851823 1869ee70
No related branches found
No related tags found
1 merge request!1123Resolve "Finalise Vuetify app as SPA"
Pipeline #108471 canceled
......@@ -97,22 +97,6 @@ function generateAppImporter(appDetails) {
return code;
}
/**
* Generate a mapping of esbuild import aliases for apps.
*
* App code locations are discovered by the `aleksis-admin` vite wrapper and passed
* in the django_values hints.
*/
function generateAppAliases(appDetails) {
let aliases = { "aleksis.core": django_values.coreAssetDir };
for (const [appPackage, appMeta] of Object.entries(appDetails)) {
aliases[appPackage] = appMeta.assetDir;
}
return aliases;
}
export default defineConfig({
// root must always be the base directory of the AlekSIS-Core source tree
// Changing this will mangle the manifest key of the entrypoint!
......@@ -309,8 +293,14 @@ export default defineConfig({
alias: {
"@": path.resolve(django_values.node_modules),
vue: path.resolve(django_values.node_modules + "/vue/dist/vue.esm.js"),
"aleksis.core": django_values.coreAssetDir,
// Add aliases for every app using their package name
...generateAppAliases(django_values.appDetails),
...Object.fromEntries(
Object.entries(django_values.appDetails).map(([name, appMeta]) => [
name,
appMeta.assetDir,
])
),
},
},
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment