mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 03:25:52 +01:00
Merge remote-tracking branch 'origin/move-config-root'
This commit is contained in:
commit
8a5f1ed9cd
@ -33,7 +33,7 @@ function appendVariablesToCSS(variables, cssSource) {
|
||||
|
||||
function addThemesToConfig(bundle, manifestLocations, defaultThemes) {
|
||||
for (const [fileName, info] of Object.entries(bundle)) {
|
||||
if (fileName === "assets/config.json") {
|
||||
if (fileName === "config.json") {
|
||||
const source = new TextDecoder().decode(info.source);
|
||||
const config = JSON.parse(source);
|
||||
config["themeManifests"] = manifestLocations;
|
||||
|
@ -16,11 +16,17 @@ export default defineConfig(({mode}) => {
|
||||
sourcemap: true,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
assetFileNames: (asset) =>
|
||||
asset.name.includes("config.json") ||
|
||||
asset.name.match(/theme-.+\.json/)
|
||||
? "assets/[name][extname]"
|
||||
: "assets/[name].[hash][extname]",
|
||||
assetFileNames: (asset) => {
|
||||
if (asset.name.includes("config.json")) {
|
||||
return "[name][extname]";
|
||||
}
|
||||
else if (asset.name.match(/theme-.+\.json/)) {
|
||||
return "assets/[name][extname]";
|
||||
}
|
||||
else {
|
||||
return "assets/[name].[hash][extname]";
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user