mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-05 22:25:36 +00:00
first cut at embedding dendrite into riot as a service-worker
This commit is contained in:
+14
-1
@@ -27,7 +27,12 @@ module.exports = (env, argv) => {
|
||||
entry: {
|
||||
"bundle": "./src/vector/index.js",
|
||||
"indexeddb-worker": "./src/vector/indexeddb-worker.js",
|
||||
"dendrite-sw": "./src/vector/dendrite-sw.js",
|
||||
"mobileguide": "./src/vector/mobile_guide/index.js",
|
||||
"sqlite_bridge": "./node_modules/go-sqlite3-js/js/bridge.js",
|
||||
"go_http_bridge": "./node_modules/go-http-js-libp2p/js/bridge.js",
|
||||
"sql_wasm": "./node_modules/go-sqlite3-js/node_modules/sql.js/dist/sql-wasm.wasm",
|
||||
"dendrite_wasm": "./src/vector/dendrite.wasm",
|
||||
|
||||
// CSS themes
|
||||
"theme-light": "./node_modules/matrix-react-sdk/res/themes/light/css/light.scss",
|
||||
@@ -205,7 +210,9 @@ module.exports = (env, argv) => {
|
||||
loader: "file-loader",
|
||||
type: "javascript/auto", // https://github.com/webpack/webpack/issues/6725
|
||||
options: {
|
||||
name: '[name].[hash:7].[ext]',
|
||||
// fixme - we should have a hash in this for cachebusting, but haven't figured
|
||||
// out a way yet to pass the resulting path from webpack into dendrite-sw
|
||||
name: '[name].[ext]',
|
||||
outputPath: '.',
|
||||
},
|
||||
},
|
||||
@@ -259,6 +266,10 @@ module.exports = (env, argv) => {
|
||||
]
|
||||
},
|
||||
|
||||
node: {
|
||||
fs: 'empty' // needed for sql.js
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
@@ -308,6 +319,8 @@ module.exports = (env, argv) => {
|
||||
// chunks even after the app is redeployed.
|
||||
filename: "bundles/[hash]/[name].js",
|
||||
chunkFilename: "bundles/[hash]/[name].js",
|
||||
libraryTarget: "var",
|
||||
library: "[name]",
|
||||
},
|
||||
|
||||
// configuration for the webpack-dev-server
|
||||
|
||||
Reference in New Issue
Block a user