forked from mystiq/hydrogen-web
Merge pull request #802 from vector-im/fix-dev-server
Fix bug that stops hydrogen from running in dev server
This commit is contained in:
commit
bb5711db7e
1 changed files with 6 additions and 11 deletions
|
@ -136,7 +136,6 @@ module.exports = function buildThemes(options) {
|
||||||
},
|
},
|
||||||
|
|
||||||
async buildStart() {
|
async buildStart() {
|
||||||
if (isDevelopment) { return; }
|
|
||||||
const { themeConfig } = options;
|
const { themeConfig } = options;
|
||||||
for (const location of themeConfig.themes) {
|
for (const location of themeConfig.themes) {
|
||||||
manifest = require(`${location}/manifest.json`);
|
manifest = require(`${location}/manifest.json`);
|
||||||
|
@ -157,18 +156,14 @@ module.exports = function buildThemes(options) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// emit the css as built theme bundle
|
// emit the css as built theme bundle
|
||||||
this.emitFile({
|
if (!isDevelopment) {
|
||||||
type: "chunk",
|
this.emitFile({ type: "chunk", id: `${location}/theme.css?variant=${variant}${details.dark ? "&dark=true" : ""}`, fileName, });
|
||||||
id: `${location}/theme.css?variant=${variant}${details.dark? "&dark=true": ""}`,
|
}
|
||||||
fileName,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
// emit the css as runtime theme bundle
|
// emit the css as runtime theme bundle
|
||||||
this.emitFile({
|
if (!isDevelopment) {
|
||||||
type: "chunk",
|
this.emitFile({ type: "chunk", id: `${location}/theme.css?type=runtime`, fileName: `theme-${themeCollectionId}-runtime.css`, });
|
||||||
id: `${location}/theme.css?type=runtime`,
|
}
|
||||||
fileName: `theme-${themeCollectionId}-runtime.css`,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue