-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
31 lines (29 loc) · 956 Bytes
/
webpack.config.js
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
26
27
28
29
30
31
// 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: {
offscreen: path.resolve(__dirname, 'out/offscreen.js'),
"content-script": path.resolve(__dirname, 'out/content-script.js'),
"service-worker": path.resolve(__dirname, 'out/service-worker.js')
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].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: 'development',
devtool: false,
}
};