-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
53 lines (51 loc) · 1.3 KB
/
webpack.config.js
File metadata and controls
53 lines (51 loc) · 1.3 KB
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
44
45
46
47
48
49
50
51
52
53
const path = require('path');
const webpack = require('webpack')
const electron = require('electron')
const app = electron.app
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const VueLoaderPlugin = require('vue-loader/lib/plugin')
//-- different target directories based on platforms
let targetPath = process.platform == 'linux' ?
path.join(process.env.HOME, '.config/multimodal/app') :
path.join('/Library/Application Support/multimodal/app')
module.exports = {
mode: 'development',
entry: {
topic:'./src/renderer/topic.js',
main:'./src/renderer/main.js'
},
output: {
filename: '[name].js',
path: targetPath
},
module: {
rules: [
{
test: /\.scss$/,
use: ['vue-style-loader', 'css-loader', 'resolve-url-loader', 'sass-loader?sourceMap']
},
{
test: /\.(woff|ttf|otf|eot|svg)$/,
exclude: /node_modules/,
loader: 'file-loader',
options: {
limit: 50000,
name: 'fonts/[name].[ext]'
},
},
{
test: /\.vue$/,
loader: 'vue-loader'
}
]
},
plugins: [
new VueLoaderPlugin()
],
target: "electron-main",
resolve: {
alias: {
vue: 'vue/dist/vue.js'
}
}
};