Changeset View
Changeset View
Standalone View
Standalone View
web/webpack.config.cjs
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | devServer: { | ||||
static: { | static: { | ||||
directory: path.join(__dirname, 'dist'), | directory: path.join(__dirname, 'dist'), | ||||
}, | }, | ||||
}, | }, | ||||
plugins: [ | plugins: [ | ||||
new CopyPlugin({ | new CopyPlugin({ | ||||
patterns: [ | patterns: [ | ||||
{ | { | ||||
from: 'node_modules/@matrix-org/olm/olm.wasm', | from: 'node_modules/@commapp/olm/olm.wasm', | ||||
to: path.join(__dirname, 'dist'), | to: path.join(__dirname, 'dist'), | ||||
}, | }, | ||||
], | ], | ||||
}), | }), | ||||
new CopyPlugin({ | new CopyPlugin({ | ||||
patterns: [ | patterns: [ | ||||
{ | { | ||||
from: | from: | ||||
'node_modules/@commapp/opaque-ke-wasm' + | 'node_modules/@commapp/opaque-ke-wasm' + | ||||
'/pkg/comm_opaque2_wasm_bg.wasm', | '/pkg/comm_opaque2_wasm_bg.wasm', | ||||
to: path.join(__dirname, 'dist', 'opaque-ke.wasm'), | to: path.join(__dirname, 'dist', 'opaque-ke.wasm'), | ||||
}, | }, | ||||
], | ], | ||||
}), | }), | ||||
], | ], | ||||
}; | }; | ||||
const baseProdBrowserConfig = { | const baseProdBrowserConfig = { | ||||
...baseBrowserConfig, | ...baseBrowserConfig, | ||||
plugins: [ | plugins: [ | ||||
new CopyPlugin({ | new CopyPlugin({ | ||||
patterns: [ | patterns: [ | ||||
{ | { | ||||
from: 'node_modules/@matrix-org/olm/olm.wasm', | from: 'node_modules/@commapp/olm/olm.wasm', | ||||
to: path.join(__dirname, 'dist', 'olm.[contenthash:12].wasm'), | to: path.join(__dirname, 'dist', 'olm.[contenthash:12].wasm'), | ||||
}, | }, | ||||
], | ], | ||||
}), | }), | ||||
new CopyPlugin({ | new CopyPlugin({ | ||||
patterns: [ | patterns: [ | ||||
{ | { | ||||
from: | from: | ||||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |