generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
webpack.config.js
43 lines (43 loc) · 1.11 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
module.exports = {
entry: './src/Main.ts',
output: {
path: '/home/jonas/.local/share/kerker/kerkers/Obsidian_Development/home/DevVault/.obsidian/plugins/obsidian-ocr/dist',
filename: 'main.js',
libraryTarget: 'commonjs',
clean: true,
},
target: 'node',
module: {
rules: [{ test: /\.wasm$/, type: "asset/inline" },
{
test: /\.ts$/,
loader: 'ts-loader',
options: {
transpileOnly: true,
},
}],
noParse: /node_modules\/sql\.js\/dist\/sql-wasm\.js$/,
},
mode: "development",
devtool: "inline-source-map",
target: "node",
optimization: {
minimize: false,
},
experiments: {
asyncWebAssembly: true,
syncWebAssembly: true
},
resolve: {
modules: ['node_modules', "src"],
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
},
externals: {
electron: 'commonjs2 electron',
obsidian: 'commonjs2 obsidian',
},
experiments: {
asyncWebAssembly: true,
syncWebAssembly: true
}
};