2019-12-24 15:40:03 +03:00
|
|
|
const path = require('path')
|
|
|
|
const nodeExternals = require('webpack-node-externals')
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: {
|
2019-12-28 02:34:24 +03:00
|
|
|
'api/build': './src/api/build.ts',
|
|
|
|
'api/dev': './src/api/dev.ts',
|
|
|
|
'api/init': './src/api/init.ts',
|
|
|
|
'api/tauricon': './src/api/tauricon.ts',
|
2020-03-07 19:40:24 +03:00
|
|
|
'api/info': './src/api/info.ts',
|
2019-12-28 02:37:21 +03:00
|
|
|
'helpers/tauri-config': './src/helpers/tauri-config.ts',
|
2020-03-07 19:40:24 +03:00
|
|
|
'helpers/spawn': './src/helpers/spawn.ts'
|
2019-12-24 15:40:03 +03:00
|
|
|
},
|
|
|
|
mode: process.env.NODE_ENV || 'development',
|
|
|
|
devtool: 'source-map',
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
use: 'ts-loader',
|
|
|
|
exclude: /node_modules/
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
node: false,
|
|
|
|
resolve: {
|
|
|
|
extensions: ['.ts', '.js']
|
|
|
|
},
|
|
|
|
output: {
|
|
|
|
library: 'tauri',
|
|
|
|
libraryTarget: 'umd',
|
|
|
|
filename: '[name].js',
|
|
|
|
path: path.resolve(__dirname, 'dist')
|
|
|
|
},
|
|
|
|
externals: [nodeExternals()],
|
|
|
|
target: 'node'
|
|
|
|
}
|