Skip to content

Commit 0da52d7

Browse files
committed
Fixes Double Copy of WASM
TLSN Wasm is ~16MB, current setup was copying the file twice into the build. This change switches to prevent a hash rename for `tlsn_wasm_bg.wasm` while still copying the `.js` files.
1 parent f669b53 commit 0da52d7

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

webpack.config.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ module.exports = (env) => {
9595
replacement: resolve('./src/environment.dev.ts'),
9696
},
9797
},
98+
{
99+
test: /tlsn_wasm_bg\.wasm$/,
100+
type: 'asset/resource',
101+
generator: {
102+
filename: 'tlsn_wasm_bg.wasm',
103+
},
104+
},
98105
],
99106
},
100107
plugins: [
@@ -111,7 +118,7 @@ module.exports = (env) => {
111118
{from: 'README.md', to: '', context: '.'},
112119
{from: 'src/popup/popup.html', to: 'src/', context: '.'},
113120
{from: 'src/offscreen/offscreen.html', to: 'src/', context: '.'},
114-
{from: 'node_modules/@csfloat/tlsn-wasm/*.{wasm,js}', to: '[name][ext]'},
121+
{from: 'node_modules/@csfloat/tlsn-wasm/*.js', to: '[name][ext]'},
115122
{from: 'node_modules/@csfloat/tlsn-wasm/snippets', to: 'snippets/', context: '.'},
116123
{
117124
from: 'manifest.json',

0 commit comments

Comments
 (0)