mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
34 lines
922 B
JavaScript
34 lines
922 B
JavaScript
const injectWebManifest = require("./scripts/build-plugins/manifest");
|
|
const injectServiceWorker = require("./scripts/build-plugins/service-worker");
|
|
const fs = require("fs");
|
|
const path = require("path");
|
|
|
|
const version = JSON.parse(fs.readFileSync(path.join(__dirname, "package.json"), "utf8")).version;
|
|
|
|
export default {
|
|
public: false,
|
|
root: "src/platform/web",
|
|
server: {
|
|
hmr: false
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"safe-buffer": "./scripts/package-overrides/safe-buffer/index.js",
|
|
"buffer": "./scripts/package-overrides/buffer/index.js"
|
|
}
|
|
},
|
|
build: {
|
|
outDir: "../../../target",
|
|
emptyOutDir: true,
|
|
minify: true,
|
|
sourcemap: true
|
|
},
|
|
plugins: [
|
|
injectWebManifest("assets/manifest.json"),
|
|
injectServiceWorker("sw.js")
|
|
],
|
|
define: {
|
|
"HYDROGEN_VERSION": JSON.stringify(version)
|
|
}
|
|
};
|