diff --git a/js/ort-whisper/webpack.config.js b/js/ort-whisper/webpack.config.js index 0665e993e..59d1d9bea 100644 --- a/js/ort-whisper/webpack.config.js +++ b/js/ort-whisper/webpack.config.js @@ -17,8 +17,11 @@ module.exports = () => { } }, plugins: [new CopyPlugin({ - // Use copy plugin to copy *.wasm to output folder. - patterns: [{ from: 'node_modules/onnxruntime-web/dist/*.wasm', to: '[name][ext]' }] + // Use copy plugin to copy *.wasm and *.mjs to output folder. + patterns: [ + { from: 'node_modules/onnxruntime-web/dist/*.wasm', to: '[name][ext]' }, + { from: 'node_modules/onnxruntime-web/dist/*.mjs', to: '[name][ext]' } + ] })], mode: 'production' } diff --git a/js/quick-start_onnxruntime-web-bundler/webpack.config.js b/js/quick-start_onnxruntime-web-bundler/webpack.config.js index 0fa8dd551..0975ac15e 100644 --- a/js/quick-start_onnxruntime-web-bundler/webpack.config.js +++ b/js/quick-start_onnxruntime-web-bundler/webpack.config.js @@ -16,8 +16,11 @@ module.exports = () => { } }, plugins: [new CopyPlugin({ - // Use copy plugin to copy *.wasm to output folder. - patterns: [{ from: 'node_modules/onnxruntime-web/dist/*.wasm', to: '[name][ext]' }] + // Use copy plugin to copy *.wasm and *.mjs to output folder. + patterns: [ + { from: 'node_modules/onnxruntime-web/dist/*.wasm', to: '[name][ext]' }, + { from: 'node_modules/onnxruntime-web/dist/*.mjs', to: '[name][ext]' } + ] })], mode: 'production' } diff --git a/js/sd-turbo/webpack.config.js b/js/sd-turbo/webpack.config.js index def2dfd2e..eb6b83321 100644 --- a/js/sd-turbo/webpack.config.js +++ b/js/sd-turbo/webpack.config.js @@ -23,13 +23,17 @@ export default { }, }, plugins: [ - // Copy .wasm files to dist folder + // Copy .wasm and .mjs files to dist folder new CopyWebpackPlugin({ patterns: [ { from: 'node_modules/onnxruntime-web/dist/*.wasm', to: 'dist/[name][ext]' }, + { + from: 'node_modules/onnxruntime-web/dist/*.mjs', + to: 'dist/[name][ext]' + }, ], }), ], diff --git a/js/segment-anything/webpack.config.js b/js/segment-anything/webpack.config.js index def2dfd2e..eb6b83321 100644 --- a/js/segment-anything/webpack.config.js +++ b/js/segment-anything/webpack.config.js @@ -23,13 +23,17 @@ export default { }, }, plugins: [ - // Copy .wasm files to dist folder + // Copy .wasm and .mjs files to dist folder new CopyWebpackPlugin({ patterns: [ { from: 'node_modules/onnxruntime-web/dist/*.wasm', to: 'dist/[name][ext]' }, + { + from: 'node_modules/onnxruntime-web/dist/*.mjs', + to: 'dist/[name][ext]' + }, ], }), ],