Skip to content

Commit bd997d3

Browse files
authored
Merge pull request #10055 from nextcloud/chore/esbuild
Migrate to ESBuild in Webpack
2 parents 7bcb9bc + abec32c commit bd997d3

18 files changed

Lines changed: 790 additions & 132 deletions

File tree

package-lock.json

Lines changed: 672 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"@vue/test-utils": "^1.3.6",
7878
"@vue/vue2-jest": "^29.2.5",
7979
"babel-loader-exclude-node-modules-except": "^1.2.1",
80-
"babel-plugin-add-module-exports": "^1.0.4",
80+
"esbuild-loader": "^3.0.1",
8181
"flush-promises": "^1.0.2",
8282
"jest": "^29.6.2",
8383
"jest-environment-jsdom": "^29.6.2",

src/__mocks__/attachmediastream.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/components/CallView/shared/LocalVideo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
</template>
7171

7272
<script>
73-
import attachMediaStream from 'attachmediastream'
73+
import attachMediaStream from 'attachmediastream/attachmediastream.bundle.js'
7474
import Hex from 'crypto-js/enc-hex.js'
7575
import SHA1 from 'crypto-js/sha1.js'
7676

src/components/CallView/shared/Screen.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
</template>
3636

3737
<script>
38-
import attachMediaStream from 'attachmediastream'
38+
import attachMediaStream from 'attachmediastream/attachmediastream.bundle.js'
3939
import Hex from 'crypto-js/enc-hex.js'
4040
import SHA1 from 'crypto-js/sha1.js'
4141

src/components/CallView/shared/VideoVue.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
</template>
9696

9797
<script>
98-
import attachMediaStream from 'attachmediastream'
98+
import attachMediaStream from 'attachmediastream/attachmediastream.bundle.js'
9999
import Hex from 'crypto-js/enc-hex.js'
100100
import SHA1 from 'crypto-js/sha1.js'
101101

src/mixins/devices.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
*/
2222

23-
import attachMediaStream from 'attachmediastream'
23+
import attachMediaStream from 'attachmediastream/attachmediastream.bundle.js'
2424
import hark from 'hark'
2525

2626
import TrackToStream from '../utils/media/pipeline/TrackToStream.js'

src/utils/media/effects/virtual-background/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// @flow
1+
import * as wasmCheck from 'wasm-check'
22

33
import JitsiStreamBackgroundEffect from './JitsiStreamBackgroundEffect.js'
44
import createTFLiteSIMDModule from './vendor/tflite/tflite-simd.js'
@@ -29,14 +29,11 @@ export async function createVirtualBackgroundEffect(virtualBackground, dispatch)
2929
throw new Error('JitsiStreamBackgroundEffect not supported!')
3030
}
3131
let tflite
32-
let wasmCheck
3332

3433
// Checks if WebAssembly feature is supported or enabled by/in the browser.
3534
// Conditional import of wasm-check package is done to prevent
3635
// the browser from crashing when the user opens the app.
37-
3836
try {
39-
wasmCheck = require('wasm-check')
4037
if (wasmCheck?.feature?.simd) {
4138
tflite = await createTFLiteSIMDModule()
4239
} else {

src/utils/media/pipeline/VirtualBackground.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
*
2222
*/
2323

24+
import * as wasmCheck from 'wasm-check'
25+
2426
import { VIRTUAL_BACKGROUND } from '../../../constants.js'
2527
import JitsiStreamBackgroundEffect from '../effects/virtual-background/JitsiStreamBackgroundEffect.js'
2628
import TrackSinkSource from './TrackSinkSource.js'
@@ -72,8 +74,6 @@ export default class VirtualBackground extends TrackSinkSource {
7274
}
7375

7476
static _checkWasmSupport() {
75-
const wasmCheck = require('wasm-check')
76-
7777
if (!wasmCheck.support()) {
7878
this._wasmSupported = false
7979

src/utils/webrtc/models/CallParticipantModel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
*/
2121

22-
import attachMediaStream from 'attachmediastream'
22+
import attachMediaStream from 'attachmediastream/attachmediastream.bundle.js'
2323

2424
import EmitterMixin from '../../EmitterMixin.js'
2525

0 commit comments

Comments
 (0)