forked from microsoft/onnxruntime-inference-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
25 lines (23 loc) · 737 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
25 lines (23 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license
const path = require('path');
const CopyPlugin = require("copy-webpack-plugin");
module.exports = () => {
return {
target: ['web'],
entry: path.resolve(__dirname, 'main.js'),
devtool: 'inline-source-map',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.min.js',
library: {
type: 'umd'
}
},
plugins: [new CopyPlugin({
// Use copy plugin to copy *.wasm to output folder.
patterns: [{ from: 'node_modules/onnxruntime-web/dist/*.wasm', to: '[name][ext]' }]
})],
mode: 'production'
}
};